core: rearrange package structure

No visible external changes, but this makes it easier to plug the CFFI
backend.
build: fix verbose output in Python 3
travis: fix testing on TravisCI
travis: run tests using Tox
test: fix tests when running inside Tox