Further cleanup
Cleanup imports

This patch moves all the imports that were dispersed around
the codebase to the top of the file. This was not possible
in previous versions which loaded the backend automatically
before the configuration was updated from a file.

This may require prior configuration of Tryton in your
application WSGI script