Substitute correct versions numbers from the build into the docs

We can use parsed-literal blocks in reST for code blocks that need
to contain the version/release number from the build. Unfortunately,
there is no way to keep syntax highlighting in Sphinx for these blocks
but it is a minor loss compared to the benefit of always building the
docs with the correct version numbers without manual intervention.

Fixes issues #642, #654, #632.
Merge pull request #662 from slick/tmp/version-substitution

Substitute correct versions numbers from the build into the docs