[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_attachment() function

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

PHPBB3-11148
[ticket/11148] Default to application/octet-stream if no mimetype given

This should prevent us from having an empty mimetype while uploading a file
using local_upload().

PHPBB3-11148
[ticket/11148] Add missing parts to docblock of get_mimetype() method

PHPBB3-11148
[ticket/11148] Get rid of extra line in mimetype guesser setter doc block

PHPBB3-11148
[ticket/11148] Always use the output of the mimetype guesser in get_mimetype

PHPBB3-11148
[ticket/11148] Change expected output with disallowed content in test

PHPBB3-11148
[ticket/11148] Remove unneeded variable mimetype and use type octet-stream

The variable $mimetype is not used in the method local_upload() afterwards
so it shouldn't be assigned. The correct default mimetype should be
application/octet-stream and not application/octetstream according to RFC 2046.

PHPBB3-11148
[ticket/12051] Optimise Composer Autoloader on Build

PHPBB3-12051
Merge remote-tracking branch 'github-marc1706/ticket/11148' into develop-ascraeus

* github-marc1706/ticket/11148:
  [ticket/11148] Remove unneeded variable mimetype and use type octet-stream
  [ticket/11148] Change expected output with disallowed content in test
  [ticket/11148] Always use the output of the mimetype guesser in get_mimetype
  [ticket/11148] Get rid of extra line in mimetype guesser setter doc block
  [ticket/11148] Add missing parts to docblock of get_mimetype() method
  [ticket/11148] Default to application/octet-stream if no mimetype given
  [ticket/11148] Use mimetype guesser for uploaded avatars
  [ticket/11148] Pass mimetype guesser to upload_attachment() function
  [ticket/11148] Add mimetype guesser to filespec and fileupload class
Merge pull request #2644 from Nicofuma/ticket/12051

[ticket/12051] Optimise Composer Autoloader on Build

* Nicofuma/ticket/12051:
  [ticket/12051] Optimise Composer Autoloader on Build