MB-11948: Handle GetLastError() returning 0 condition
MB-11948: Handle GetLastError() returning 0 condition

In windows, the GetLastError() call sometimes returns 0 instead of
the returning WSAEWOULDBLOCK. Either the error gets reset before
the invocation or it could be undefined behavior.

Change-Id: Ifb8f7d576b447d090b21cc0747d068ead0597182
Reviewed-on: http://review.couchbase.org/40865
Reviewed-by: abhinav dangeti <d73ef2279de6577f7bf081737ee47554bbb7dc82@couchbase.com>
Reviewed-by: Sundararaman Sridharan <333a3f71d3ad6e01fc953c4fa06bc1f3cd014910@couchbase.com>
Tested-by: Sriram Ganesan <fde85c3124eed34938bb85159f430bf7e5b650f6@couchbase.com>

membase/ep-engine,daverigby/kv_engine,teligent-ru/ep-engine,daverigby/ep-engine,sriganes/ep-engine,owendCB/ep-engine,teligent-ru/ep-engine,couchbase/ep-engine,jimwwalker/ep-engine,sriganes/ep-engine,couchbase/ep-engine,hisundar/ep-engine,owendCB/ep-engine,hisundar/ep-engine,daverigby/kv_engine,membase/ep-engine,hisundar/ep-engine,membase/ep-engine,owendCB/ep-engine,daverigby/ep-engine,teligent-ru/ep-engine,couchbase/ep-engine,daverigby/ep-engine,daverigby/ep-engine,sriganes/ep-engine,membase/ep-engine,daverigby/kv_engine,jimwwalker/ep-engine,daverigby/kv_engine,jimwwalker/ep-engine,jimwwalker/ep-engine,hisundar/ep-engine,owendCB/ep-engine,sriganes/ep-engine,teligent-ru/ep-engine,couchbase/ep-engine