Code style adherence.

Mostly spaces to tabs, a few empty line changes, and a few comment
reformats.
Style and typography fixes.

* Curly apostrophes and quotation marks.
* Em dashes.
* Remove double-spaces after periods.
* Replace stray .note HTML divs with Markdown.
* Remove any trailing whitespace.
* Put inline code Markdown on a few function mentions.
No entities.