Connection reuse

The main changes revolve around the irods connections:
Handling connection reuse when multiple connections are required in one client requests, and handling the connection fully without using the flask request stack (g.something).
This also makes it easier to port the backend code to another system.

More changes are:
rewrite the .travis file to use the refactored tests
add tests for write()
ensure some functions are exception-free (for the known exceptions)