[ticket/9492] Retain custom ranks and avatars when setting users default group

PHPBB3-9492
[ticket/9492] Add unit tests for custom ranks and avatars

PHPBB3-9492
[ticket/9492] Fix undefined user_avatar_* values when updating the group avatar

PHPBB3-9492
[ticket/9492] Ensure to update all avatar values when the avatar is changed

PHPBB3-9492
[ticket/9492] Ensure to delete the avatar/rank data when we change it

PHPBB3-9492