Added some features needed to implement RFC3156

Here are the changes I added in my fork to be able to generate RFC 3156 messages.  The main change needed was to be able to explicitly set the transfer encoding and content-disposition fields.  I also added a convenience function to render the entire message and return it as a string and some other minor fixes.

I did NOT do any work on the client side to fix it to be able to process and read incoming RFC3156 messages, I only worked on the create-and-send side of the problem.

I don't have time to work this into shape to merge to the mainline, but if someone wants to pick this up and clean it up and put it into MC2, thats fine with me.