[ticket/11148] Add mimetype guesser to filespec and fileupload class

The mimetype guesser will be used to get the mimetype of uploaded files.
Until now, this was only used for files uploaded with plupload. If a file
doesn't have a mimetype supplied, we will now try to get the correct mimetype.

PHPBB3-11148
[ticket/11148] Pass mimetype guesser to upload_attachments() function

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

PHPBB3-11148