tests: update to mime.charset

check mime.charsets.lookup() for backwards-compat
tests: more coverage
sources: update documentation
comment and spacing nits

That switch case kept looking at me funny.
readme: some doc nits
build: add eof newlines to json