Build Haddock documentation on Travis.

Fixes #2198.