Also fixes up a minor round-trip issue with encoding some of the fields
Add some tests to vet this in lua as well. lua mime parsing functions now also accept bstring input.