Connection pooling in gorethink wasn't working like I thought it
would. Since connections weren't being pulled uploads would fail when
there were no more TCP connections allowed to the database.

To resolve this I keep session state around in the service for database
access and got rid of the global variables. What this means is that
every state machine has a single connection it uses to the database.