Move connection pooling into new class

Implements getDebugInfo method for checking status.
Show pool status on settings page accessible to admin.