travis-ci: added gcc 4.7 build; moved commands to scripts