Use db context manager with baked in timeout detection
Merge pull request #203 from cggh/SQL_timeout_rework

Use db context manager with baked in timeout detection