Travis: Enable caching of dependencies

Enables APT caching, which should (maybe) gives us slightly better Travis turn-around times: http://docs.travis-ci.com/user/caching/#Caching-Ubuntu-packages

Also cache the Homebrew cache on OS X, to avoid having to download from the awful sf.net mirrors which keep giving us problems.