functions: Fixed PEP8 warnings

E501 line too long
tests: Fixed PEP8 warnings
TravisCI: Added flake8 checking

E711 is ignored because "is None" does not work in SQLAlchemy's filter()
method, but flake8 warns that "== None" should not be used.
shape: Fixed buffer usage for Python 3.x

This is theoretically irrelevant since shapely is not yet compatible
with Python 3.x, but flake8 is complaining on Python 3.x that buffer is
not defined.
Merge pull request #40 from Turbo87/pep8

Add pep8 validation to Travis build process