[ticket/11842] Use type map for updating avatar types in database

PHPBB3-11842