Added and incorporated Session and SessionManager

Also split server and client outgoing and incoming into two sockets and
implemented a handshaking mechanism for both.