[travis] Only run tests on master; ./build.sh.

Don't consider the build broken if a feature branch is broken.

Move the actual build command to a separate script -- easier to read,
easier to maintain, and easier to run by hand.