Refactor: libs: Move tls-specific code from remote.c to tls.c.
Note that there's more gnutls references remaining in remote.c.
Basically anywhere a function has to determine what type a session is
and do a read/write on it still has a gnutls reference. I don't think
it's worth trying to isolate the gnutls code further because it would
probably require creating some abstraction with function pointers for
different types of sessions.