Bring up to PSR0/1/2 compliance

This PR brings the project into line with PSR0/1/2 and applies common conventions.
I've added integration for Travis CI and added the package to packagist.