runtime: fix deadlock in network poller
The invariant is that there must be at least one running P or a thread polling network.
It was broken.
Fixes issue 5216.

R=golang-dev, bradfitz, r
CC=golang-dev
https://codereview.appspot.com/8459043