Improve Travis CI configuration

- Use `install` and `before_install` build phases appropriately.
 - Perform `composer self-update` before install.
 - Perform `composer install` on install.
- Cache Composer cache between builds.