Finished codec

Added handling of server greeting and multiline extension list
+ command encoder
+ refactoring of request and reply types