Add Travis CI

This patch adds a .travis.yml configuration file and a badge to the README to make the build status more visible. All that is required after merging this patch is enabling Travis CI for this project.

I have also taken the liberty of cleaning up whitespace.

Everything is done in a separate commits, so feel free to cherry-pick only the changes you want.

Thanks!