Rewrite nrepl connection logic

- Extract networking functionality (`nrepl-connect`, `nrepl--direct-connect`,
  `nrepl--ssh-tunnel-connect`)

- When `nrepl-force-ssh-on-remotes` is nil try a direct connection with remote
  hosts before attempting a ssh tunnel.
Seems strange the port can be both a number or string. I think this function should accept only a number and that its callers should have any conversion if necessary.