WIP Capability detection for networker

In a first approach the decision on using the standard or the safe networker has been done based on the provider type. In case of all but MAAS the safe networker has been used. Now a new environment capability has been added, so that each provider can return if it requires a safe networker for the current machine. As this today depends on the machine (local provider dislikes the changes done by the networker on the bootstap node, because it's the host system) and if the machine has been manually provisioned.

Fixes #1354365.
I'd actually like this better than the existing Discard() method below. Can we replace Discard() with this (i.e. keep the name Discard, but retain the logic here returning a restore function)? Discard() is currently used only in a few places in tests, so it shouldn't be a problem.