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)
Does it make sense to test documentation both in GCC and CLANG?