minor adjustments to markdown / rst templates

- remote prompts from output
- add missing HTML block
- remove double-wrapping of latex
- use plain-markdown indentation for code blocks (could use GFM '` ` `python')

closes #4024

candidate for backport to 1.1
fix markdown images

use split-files for embedded images

add path2url
fix jpg/jpeg type in sphinx
Merge pull request #4174 from minrk/markup-templates

various issues in markdown and rst templates

- remove prompts from default output
- add missing HTML block
- remove double-wrapping of latex
- use plain-markdown indentation for code blocks (could use GFM ``` ` ` `python```)
- images didn't work in either one at all
- markdown extracts output

closes #4024