travis: Split build logic into a separate script

- allows testing of travis logic locally
- allows simple extension and modification of tests
- similar to the existing way bioformats does this

Testing:
- if travis is green, that's about it
- verify that the logic used before and after the change is the same