Close connection as soon as server identity is retrieved

This is also avoiding a problem with iOS8 (issue #15) where only the first call to the plugin will go through. Thanks to closing the connection, the plugin can be called multiple times.

I validated it with simple tests on an iPhone and emulator running iOS 8.0.2, but a validation from an experienced Obj C developer would be required as my knowledge of it is limited.