Split into library and executable

Speeds up building and prepares for tests
Add tests for Python/Haskell roundtripping
Run tests on Travis CI