Properly close socket in case of socket creation error

Fixes https://github.com/mDialog/scala-zeromq/issues/6