unix, windows: add uv_has_ref() function