Add allow_net_connect! connection method

Also adds disable_net_connect! to go back to mocked connection.