client: Move the connection type logic to the connect function

Instead of recording the connection type in the riemann_client_t
structure, store function pointers instead. This way the only function
that needs to know about the connection type is the connect function
itself.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>