Pessimistic pool connection handling for master and run

@krishnap 

This should fix the problem where I had HivePartitionSensor run for a long time and pooled DB connections would die and the completion of the process would not write to the DB. 

There's a bit of overhead here though, where each DB transaction will have a dummy ping. Better that than not capturing the outcome of a job and the job staying as "running" forever

This isn't enabled for webserver, just for the run and master job, which are critical.