Adding authentication support for the connection pool.

I have been able to add authentication support for the connection pool. The authentication is done per socket in a lazy fashion. The code has been tested and it works. I also tested whether the sockets get re-authenticated during failover and it works correctly. My solution might not be elegant from a architectural or design standpoint. Suggestions for improvement are welcome.