Add ability to allow net connect inside a block

If a block is given to allow_net_connect!, allow net connection within
it and then disable_net_connect! automatically.

I think this syntax has better aesthetics than explicitly calling
disable_net_connect!, as it nicely groups allowed code within the
block.