Improve network handling

This makes some improvements to how we handle networking:
 - A WiFiLock is now created and acquired if the device has a WiFi
   connection when we're starting mining.
 - An error is now generated if the user tries to start without an
   available network connection.