Use new Travis container-based infrastructure for improved speed and cache

http://docs.travis-ci.com/user/workers/container-based-infrastructure/
Merge pull request #1577 from ntwb/patch-1

Use new Travis container-based infrastructure to enable cache