net: enable PacketConn test for raw IP network on Windows

Just forgot to include this in CL 12843043.
Also consolidates the code dealing with test environment.

Update issue 6122

R=alex.brainman
CC=golang-dev
https://codereview.appspot.com/13184043