Move build script to Rake.

Rake is cross-platform and easier to manage than Make. It's also
easier to write Rake logic than it is to mess with travis yaml.