Add ConnectionPoolWithConnection as middleware to application if
ActiveRecord and thin are used, fixes #1749