Add MD_OUTPUT_FORMAT setting

This adds the MD_OUTPUT_FORMAT setting to keep Markdown from generating non-valid code.  See issue #1024.  Defaults to Markdown's current default of xhtml1.