[ticket/11148] Pass mimetype guesser to upload_attachment() function

PHPBB3-11148
[ticket/11148] Use mimetype guesser for uploaded avatars

PHPBB3-11148