Add back synchronization to avoid corrupted subscription input/output streams

- Prevent simultaneous write of subscribe/unsubscribe using the same Connection

- Fix test failure by re-initializing "done" state of SubscriptionTask between runs and adding waits