Win32 IOCP

Change-Id: If57914db039ff8ffdd0e660f9aac5e9276ab5cbf
Reviewed-on: http://review.couchbase.org/27437
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Fix up some other re-definitions under mingw on windows

The problem with mingw is that it's very much dependent on the compiler
you're using. I've been using it locally on a Linux box, cross
compiling. However there were other issues when compiling from the
latest mingw obtained via 'mingw-builds'.

Change-Id: I1b2acebc185a388c176a6e82e528025a90fb9418
Reviewed-on: http://review.couchbase.org/27750
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>