unix, windows: clean up uv_thread_create()

Make uv_thread_create() and its helper function a little more DRY and
a little less impenetrable.