[CLC-1495] Wrapping connections with connection_pool.with_connection, clearing active connections on logout and finished cache warming

JIRA: https://jira.media.berkeley.edu/jira/browse/CLC-1495

Lots of tedious wrapping of db calls with using the "check out connection from pool, ensure connection returned back."