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>