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.
Yeah, copy-paste artifact. Will fix.

By the way:
test-tcp-close.c and test-thread-equal.c has the same line as 27 above but they don't use memset.