Docs: clean up various code blocks in docstrings, to enable correct syntax highlighting in HTML / RTD output.