trivial: fix configure.ac comment
libnm-glib: accept omitting callback in nm_remote_connection_*

The functions nm_remote_connection_save(), nm_remote_connection_commit_changes(),
and nm_remote_connection_commit_changes_unsaved() indicate in the documentation,
that they allow omitting the callback argument. Remove invalid checks
for callback.

Signed-off-by: Thomas Haller <thaller@redhat.com>
libnm-glib: take reference in NMRemoteConnection before calling DBUS

We always have to take a reference to the NMRemoteConnection
before calling to DBUS, because the connection might be deleted
in the meantime.

https://bugzilla.gnome.org/show_bug.cgi?id=723168

Signed-off-by: Thomas Haller <thaller@redhat.com>
mobile: fix disconnection on deactivation

When c4fc72c7 began using the DEACTIVATING state, the modem code
wasn't updated to handle this.  Because it only checked for
activating or ACTIVATED states to determine whether the modem was
previously connected, and thus when an MM disconnect was needed,
when the device enters the DISCONNECTED state it was no longer
considered previously active, and not disconnected.

Also, remove the NEED_AUTH handling from the modem code's device
state switch, because it does not appear to be needed.  The
modem will only enter NEED_AUTH when it requires PAP/CHAP secrets
during the connection attempt or when a PIN is required before
enabling the modem.  In both cases the modem won't yet be connected,
so this code will never be hit.
mobile: consolidate secrets requests into NMDeviceModem

Both old and new ModemManager classes were doing the same thing, so
consolidate that into the superclass and save some LoC.
mobile: only change state to NEED_AUTH during activation (rh #1058308)

Auth requests only happen during activation and there's no need to
request secrets at any other time.  Ensure that the device state
won't change to NEED_AUTH except when activating.

(There's a case in NMModemBroadband where set_mm_enabled()
when the modem is locked may cause this, but we'll solve this
a different way later.)

https://bugzilla.redhat.com/show_bug.cgi?id=1058308
mobile: fix removal of ethernet interfaces owned by modems

If the kernel doesn't tag a modem's ethernet interface with
DEVTYPE=wwan then NetworkManager has no idea that's a modem
(and cannot be used until connected via the control port).
Since DEVTYPE=wwan devices get ignored by NM, so should these
interfaces when NM knows they are modems.

That got broken at some point for ModemManager1, because the
data port isn't read until the modem is connected.  NM only
looked for and removed the data-port-as-ethernet-device when
the modem was added, long before the MM1 data port was found.

ModemManager does provide a list of ports owned by the modem
though, which we can use at modem addition time to remove
an ethernet device that is controled by the modem.
mobile: use gateway returned from ModemManager

If we get a gateway, use it.
merge: various WWAN fixes