Refactored code to depend on connection handler's #with_connection inste...

...ad of #connection.

Any place that called #connection that did not store it in some field was changed to use #with_connection because #with_connection will create a connection, run the block that needs that connection, and then let go of the connection so that connections aren't held onto.

This was per @matthewd's suggestion :smile: