correctly update read stream during ssl authentication

Previously, secure database connections broke during authentication because when the socket was wrapped using ssl, the read stream remained pointed at the raw socket. This change updates the read stream to point to the secure socket as soon as the secure connection is established.