Add Markdown links, images; better code blocks

Add all the markdown style links and images including:

- [normal](links)
- [normal](links "with titles")
- [reference][links]
- [simple references]
- [![link](with images)](inside "them")
- ![all the types](of images)
- [references]: like this
- [references]: <like this>
- [references]: with titles "attached to them"

Also, it turns out that code blocks don't need blank lines in between
them, so reorganise the structure so that they also live inside line
definitions.