normalize spacing and add syntax-highlighted code fences

There were a few different styles in the README code examples, so I normalized
on 4-space indents and 8-space hanging indents.