unix: fix uv_spawn() NULL pointer deref on ENOMEM

In the cleanup-after-error section of uv_spawn(), check that the pointer
is non-NULL - we might end up in said section due to a malloc() failure.
unix: don't close inherited fds on uv_spawn() fail

The cleanup-after-error code path in uv_spawn() was closing file
descriptors indiscriminately.  Only close file descriptors that we
created ourselves, not the ones that are passed in by the user.

Fixes joyent/node#6297.