Allow mime_magic to assign charset, code cleanup.

mime_magic fix for Issue #247:
Originally mime_magic could assign the charset when it assigned
content_encoding. The change in 85bb3ed removed the ability of
mime_magic to set the character set. This reverts that mistake.

Cleanup fix 85bb3ed for bug #153:
The content-encoding header assignment is removed since the
intent was a mistake as described in bug #153.