Check network status with NetworkManager before doing background updates.
The logic is:
- If we're on-line, check right away.
- Otherwise (offline, connecting, unknown), sleep for 20 seconds and if
we're not offline at the end, go ahead.
This is designed to prevent two problems:
- You log in. 0launch tries to check for updates to everything in your session
while you're still connecting. These things therefore never get updated.
- You're offline, but 0launch displays notifications about failing to update
from time-to-time.
If you don't use NetworkManager, then the effect of this is to always delay
updates by 20 seconds, which shouldn't cause any problems.