Introduce Gitlab::Database.with_connection_pool
This is split from !9148 (closed) (see https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9148#note_23268206), extracted from !8987 (merged), so that we have an easy way to create a new activerecord connection pool.
@yorickpeterse What do you think? Should we have a test for this?