this is copied from [activerecord](2e0afa455b556ff705c7281e934168cfa2394b5c)
The only difference is that `ConnectionAdapters::ConnectionPool` is replaced by `ActiveRecordHostPool::PoolProxy`