Update Travis configuration to use containers

Travis CI has a new container-based infrastructure which supports caching of dependency resources. Switch to use this new infrastructure and take advantage of the caching.