Use libplatform instead of pthread

Change-Id: Id366ec26ddd2e68022e70cb6fd84a00a21a04313
Reviewed-on: http://review.couchbase.org/32422
Reviewed-by: Steve Yen <steve.yen@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Cleanup from int to SOCKET

Change-Id: I43e3cc18c2a0c15845296ebfa82c9707482f9f96
Reviewed-on: http://review.couchbase.org/32423
Reviewed-by: Steve Yen <steve.yen@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Compile fixes for win32

Change-Id: I5dd91efa3089b1a312f96141459ad593726a66ef
Reviewed-on: http://review.couchbase.org/32428
Reviewed-by: Steve Yen <steve.yen@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>