Fix Travis for PRs against non-master (like release, for example)

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Merge pull request #3652 from tianon/fix-travis-on-non-master-prs

Fix Travis for PRs against non-master (like release, for example)
Update Travis to also test compiling the docs

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)