Clarify how the ConnectionHandler works

This makes the implicit description of how connection pooling works a
little more explicit. It converts the examples of a model hierarchy into
actual Ruby code and demonstrates how the key structure of the
database.yml relates to the `establish_connection` method.
Merge pull request #16361 from JackDanger/clearer-connection-pool-documentation

[doc] Clarify how the ConnectionHandler works