WIP: Update Travis CI build to try building docs

This PR adds automatic doctest builds to Travis. By including the doctests as part of the Travis test suite, the hope is to prevent the documentation examples from becoming so far out of sync with reality as to require serious manual updating, as in #7693.

Four documentation tests are included here:
- HTML documentation build test
- PDF documentation build test (which can catch some embedded HTMLisms)
- Doctest build test (runs example blocks and compares them with the embedded output)
- Link test (checks that links are still current)
In theory, the binaries built by `gcc` and `clang` could produce different output (e.g. memory addresses in printouts). If build-dependent information exists in the documentation, that should certainly be checked for.