Convert Travis-CI config to use proper C++ environment.

There's now a proper C++ environment for Travis-CI, so update to use
it. Most of the configuration is the same, but we can specify use of
both GCC and clang directly. Also, update the dependencies
installation to only install the two Boost libraries we need -- system
and thread.