Stop using libuv's flags, check in jl_close_uv if close has already been called from julia