Added Session and SessionManager interfaces

Removed ProtocolCodec and make Protocol an interface