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.