Add a method to the pipeline to fetch the connection from the client.

In this method we can put the logic needed to prepare the connection
right before sending the queued commands to the server (e.g. switching
to the master server when connected in replication mode).