Check capability when connected

We will need to check for capabilities, for example to decide which
authentication mechanism to use. We might receive this as part of the
greeting and should use it in that case. If not we will have to send a
capability command to the server and wait for the reply.

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