net: limit number of concurrent cgo calls

The limit is 500. There is no way to change it.
This primarily affects name resolution.
If a million goroutines try to resolve DNS names,
only 500 will get to execute cgo calls at a time.
But in return the operating system will not crash.

Fixes issue 5625.

R=golang-dev, dan.kortschak, r, dvyukov
CC=bradfitz, golang-dev
https://codereview.appspot.com/13038043