unix: move uv_shutdown() assertion

Allows uv_shutdown() to return an error as intended if the stream has
already been closed.

Fixes #972, refs JuliaLang/julia#4229.