Cleanup code and connection management

To improve stability, Some code and connection management are updated.

* Use Collection interface rather than sub interfaces e.g. Set/List
* Add status management designed from state machine
* Refine reconnection process

No effect for extension points.