net: enable PacketConn test for raw IP network on Windows
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

firebitsbr/golang-old,wesolows/golang-old,wesolows/golang,wesolows/golang,firebitsbr/golang-old,wesolows/golang-old,wesolows/golang-old,wesolows/golang,wesolows/golang,wesolows/golang,wesolows/golang-old,firebitsbr/golang-old,firebitsbr/golang-old,wesolows/golang,firebitsbr/golang-old,wesolows/golang-old,firebitsbr/golang-old,wesolows/golang-old,wesolows/golang-old,firebitsbr/golang-old,wesolows/golang,firebitsbr/golang-old