Moved common auth logic into core

In order to simplify protocol-specific auth implementations, I moved most of the state machine logic into the core, leaving the openfeed client to only handle the messaging.

@yingjiezhong please review and merge. Will create a separate merge request for netty-private dependent on these changes.