Generic pooling library for creating connection pools