Fix Travis CI build errors

Composer uses the GitHub API to download packages, but the API is
rate-limited so repeated builds from the same IP hit the limit. This
adds --prefer-source to download from source, which is slower but more
reliable. It also adds --no-interaction to avoid hanging in case a
similar issue should arise in the future.

Reference:
https://github.com/composer/composer/issues/1314