Add TLS for win32

Change-Id: Ib76ca222ee830de8b73c34a78abcffadb988fc3d
Reviewed-on: http://review.couchbase.org/31570
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>