Allow PDF uploads in image upload

- add support for new allow_file_upload to HTML
- add lists of mime types to python and JS
- modify js tests to be stricter and test content types as well
- modify server side file type checks to use new sets

With code and ideas from Julien Romagnoli <julien.romagnoli@fbmx.net>