Merge content parsing into class

The mailparser is a bit of a mess.  This is an attempt at merging the
content-specific parts of parsing into a class.
Merge header parsing into class

Move the header parsing functionality into a dedicated class.