Refactoring the travis scripts to allow easier extension.

I can move it to another commit as it's not quite used yet. The idea is that we bring up the tunnel in the before_install and then ssh failures don't cause build failures, just build errors.