Retry execution using PooledConnection only a finite number of times

Currently, there is a possibility of an infinite call of `PooledConnection.execute` function of the driver for certain kinds of errors like query timing out. It will keep on retrying till it exhausts all the connections in the pool, finally striking `All connections are unhealthy` error. This might cause some jobs to crash like we observed for the `publish-level-usage-events`. https://gist.github.com/cngupte123/782065e8d53c33215b28 . This PR will execute the query only a fixed number of times before passing an error in the callback.