net: make Dial, Listen and ListenPacket return consistent error value

Update issue 4856

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