Use GIOStream instead of GSocketConnection

The IMAP client stores a private GSocketConnection. This is a special
case when TLS is used since GTlsClientConnection is not a
GSocketConnection. It is wrapped in a GTcpWrapperConnection. The common
super class is GIOStream. Use GIOStream instead of GSocketConnection.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>
Implement support for the STARTTLS command

The IMAP protocol allows the connection to start in plain text and later
upgrade it to use TLS by sending the STARTTLS command followed by TLS
negotiation. Implement support for it in two steps, sending the command
and the negotiation.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>