Summary:
A few changes that should make our connect/disconnect more robust:
* Certificate provider handler should be set directly to and managed by the policy.
* Instantiate the socket once, synchronously on the connect method. Explicit deallocation once, synchronously on the disconnect method.
* Clear handlers on disconnect after clearing the delegate.
* Wait for the operation queue to drain before returning.
Reviewed By: passy
Differential Revision: D42664724
fbshipit-source-id: bd482acbb64a9bc9e36fb3418d4c81afa2109305