net: prevent races during windows lookup calls

This only affects code (with exception of lookupProtocol)
that is only executed on older versions of Windows.

R=rsc, bradfitz
CC=golang-dev
https://codereview.appspot.com/7293043