connection impl: added init flags
Modify split AgentClient to AgentConnectionManager and TalkToCommander classes.
added more log messages
Fixed the bug, which caused a message corruption if the previous message had no attahcment.