Allowed for markdown style elements to appear in <pre> untouched

This allows for valid monkey command line #Rem to not be wrapping in an h1.
Also allowed for a closing pre tag to appear at the end of a source line (an example of which is in Language Reference.txt just above "### The Int type"

Also included my mods to the page template for docs (details in the commit message)