Ensure that there is an active connection to the internet,
both when the agent starts and when there are network related errors.
Merge branch 'bug/network-check'