Make split function reentrant.
Added CAPABILITY and NOOP command parsing in ImapSession.