Fix contention and locks issue

Hey @malthe 
please take a look at the changes below.

This PR includes your work on #1 
The changes I've made were required in order to avoid pq re-connect on every scheduled task this way exhausting any available database/pool connection.

I also updated `setup.py` to include required deps so that the tests could be run.

The benchmarks show almost no changes in performance.
Thank you in advance.
Hey @malthe please take a look at this approach in testing the timers. If it looks good, we could make it available for the whole test suite and use it in other tests too.

Thanks.