Fix a segmentation fault when an initial connection attempt fails.

I found a small bug in `connect/2,3` and `connect_unix/1,2`:

`enif_release_resource(handle)` was called right before `handle->context->err` and `handle->context->errstr` were used to generate the error message resulting in a segmentation fault.

As a side note, hierdis works great so far on OS X 10.8.4 and SmartOS joyent_20130629T040542Z.