unix, windows: Added uv_thread_equal.

Implementing uv_thread_equal that compare thread just like pthread_equals.
Changing the return type of uv_thread_self to more proper one uv_thread_t.
Adding simple test.

Fixes issue #1480.
The casts aren't necessary.