Refactor and document TcpConnectionEndpoint.

After using TcpConnectionEndpoint for the first time some
refactorings were obviously necessary. The `connection` event is now
emitted when the incoming connection sent the DATA command and left the
command mode. In addition to that the TcpConnectionEndpoint class is
no longer a subclass of Connection but emits all information necessary
to create one (including the socket associated with the incoming
connection).
Complete documentation for TcpConnectionEndpoint.
Adapt TcpConnection tests to changes in TcpConnectionEndpoint.