Add connection connection disconnection methods

Targets #650.
Still missing:
 * [x] Locking
I _could_ rename the flag. But the is_init flag itself doesn't make any sense, so I decided to use it for indicating this state instead.