text: Title: Hook for replacing user avatar logic
  Body: ### Is your proposal related to a problem?
  
  From @jhrr on https://github.com/wagtail/wagtail/issues/12274#issuecomment-2514281305:
  
  > Sorry to mildly necrobump this thread, but there is one issue with cutomizing the Wagtail `UserProfile` that we've encountered, and that is being able to replace or alias the `avatar` field on the `UserProfile` with some other avatar on some other model so it could use that instead.
  
  For example, we have a custom `User` model and a `Profile` model, and we keep the avatar on the `Profile`. We'd prefer to just be able to use the avatar from the `Profile` everywhere, across all sub-domains/contexts, including inside the CMS itself. Is there any way we can achieve this currently?
  
  ### Describe the solution you'd like
  
  As per https://github.com/wagtail/wagtail/issues/12274#issuecomment-2517181624 - introduce a new `get_avatar_url` hook which is called by the `{% avatar_url %}` tag in wagtailadmin_tags.py, passing the user object and requested size. If any hook returns a non-empty response, return that in preference to the standard avatar URL logic.
  
  The change would be [to this function](https://github.com/wagtail/wagtail/blob/23275a4cef4d36bb311abe315eb9ddfc43868e8b/wagtail/admin/templatetags/wagtailadmin_tags.py#L652-L659), and would look something like (untested):
  
  ```python
  @register.simple_tag
  def avatar_url(user, size=50, gravatar_only=False):
      """
      A template tag that receives a user and size and return
      the appropriate avatar url for that user.
      Example usage: {% avatar_url request.user 50 %}
      """
      for hook_fn in hooks.get_hooks("get_avatar_url"):
          url = hook_fn(user, size)
          if url:
              return url
  
      # followed by the existing code
  ```
  
  This would need to be accompanied by unit tests - I'd suggest adding a hook function in `wagtail/test/testapp/wagtail_hooks.py` that returns a custom URL when some specific condition is true, such as the username containing "fred", and adding tests to confirm that both the custom code and the default avatar logic come into play at the appropriate times. The hook will also need to be documented in the [hooks reference docs](https://github.com/wagtail/wagtail/blob/main/docs/reference/hooks.md), and ideally we'd mention it in the [customising admin templates](https://github.com/wagtail/wagtail/blob/main/docs/advanced_topics/customization/admin_templates.md) docs too - this _could_ be a detailed howto, but I expect we can come up with a simple self-contained example snippet on the hooks reference page that's not too long, and just link to that.
  
  ### Describe alternatives you've considered
  
  On #12274 we considered:
  
  * making it possible to customise the value returned for `avatar` on `UserProfile` (too invasive)
  * overriding the wagtailadmin/shared/avatar.html template (too much copy-and-paste, and locks us in to the current template tag approach)
  * overriding `avatar_url` in the wagtailadmin_tags tag registry (likewise, locks us in to the template tag approach)
  
  ### Working on this
  
  @jhrr has first dibs on this, but anyone else is welcome to pick it up :-)