Changes related to building VMIME as a DLL.

Changes to build library as a Windows DLL. Not all changes are for this purpose - some are just to remove warnings when compiling.