[feature/avatars] Move list of supported formats to avatar driver class

Using the regex and turning it into an array if necessary seemed like the
cleanest approach to achieve this.

PHPBB3-10018