Fix race condition in TcpSession::CloseInternal method.

It's possible that calling the EventObserver for a TcpSession causes
another thread to call TcpServer::DeleteSession for the TcpSession in
question. The existing code already protects against deletion of the
TcpSession this by taking a reference on it via an intrusive pointer.

It's also possible that the TcpServer itself gets deleted via another
thread as an indirect result of calling the EventObserver.  If this
happens before the call to the OnSessionClose has been completed, we
end up accessing freed memory and crash.

This problem happens occasionally when running bgp_peer_close_test as
the XmppClient Shutdown happens around the same time that the client
received a TcpClose due to Shutdown on the XmppServer side.

Fix is to use a intrusive back pointer (TcpServerPtr) in TcpSession.

Change-Id: I5fbb00a76a333f6b1dea2e19c2c1c1e3cd2079d4
Merge "Fix race condition in TcpSession::CloseInternal method."