Conditionally install packages on travis-CI

This change to `.travis.yml` means that the extra packages are only installed when the PACKAGES variable contains something. (So, a given build might only update and install the packages that it needs, or none in the case of the default distcheck build)

This shaves off about 100 seconds from the build times