refactor travis script, only call apt-get update once

This moves the gcc 4.8 upgrade step to the "install" phase after
we run apt-get update, so that we only do that once. It can take
15 sec or so apparently to execute that command.