Return one case of UTF8 functions being used.

There are probably more I missed.
MIME cleanup.

  * Create a type synonym for MIME type (instead of `String`).
  * Add `getMimeTypeDef` function.
  * Avoid recreating MIME type `Map`s every time.
  * Move “Formula-...” case handling into `getMimeType`.