device: Disconnect service when disabling device

We should disconnect service instead of disconnecting network
when device is disabled. Otherwise service might still have
a pointer to network that is no longer valid.

Fixes BMC#24592
(cherry picked from commit a32fa8da488dd7742bdf056605c39e9832aeb876)
inotify: Change inotify mask.

Use IN_CLOSE_WRITE instead of IN_MODIFY so the notifier
is called once only after all the changes are written.

Fixes BMC#23741.
(cherry picked from commit ca06438c3bd83d1a78269ccf50d613f6826cce8b)
clock: Emit property changed signal when time property is channged.

Fixes BMC#23740.
(cherry picked from commit af1e251f8f1e0c6c50e25458793c8d2520e86f52)
technology: Register a technology is there's a driver for it

Connman should not handle technologies whose drivers are not compiled in.
This patch also avoids connman controlling the rfkill switches for
technologies not compiled in.

Fixes BMC#24549.
(cherry picked from commit e1d92d253c5db96bdc8fe2a21e463fc730570311)
ofono: Register technology driver

With e1d92d253c5db96bdc8fe2a21e463fc730570311 we need to register a driver
for each technology.

Fixes BMC#24702.
(cherry picked from commit 9a7822288bed6100cd920431ceb65f056e6e53f8)
ofono: Cancel pending SetProperty

If the cellular technolgy is disabled while ConnMan is connected
to a cellular network, the plugin gets first a network_disconnect()
call and shortly after that a modem_disable(). network_disconnect()
will set org.ofono.ConnectionContext.Active to false while this call
is pending modem_disable() tries to set org.ofono.Modem.Online to false.

There is no point in waiting for the first call to succeed or fail.
Just cancel it and set the modem offline.

Fixes BMC#24651.
(cherry picked from commit 1cb80dc2f268a341938430dfe135030c0a9f6ce5)
wifi: Write Wifi Mode to network properties

Currently adhoc networks are shown in the service list, although
connecting to those is not supported. Filtering in network.c fails
because the WiFi.Mode was not set so far.

Fixes BMC#24737
(cherry picked from commit 192346e7da9f7da9b5e525e86af5e6615630edbe)
AUTHORS: Mention Manfred's contributions

(modified from commit 16a7e6a8a60766b9a649e0965578c0399416a390)
ofono: Check for mcc before using it as an index

Also avoid calling set_regdom is the alpha2 is NULL.
(cherry picked from commit cf33699115ff48f9cbf70f45585d1b1df9946650)
resolver: Domain name was not set

When service sets the domain name, the server is NULL.
We must allow this as otherwise dnsproxy will not be able
to append domain name into DNS queries.

Fixes BMC#24712
(cherry picked from commit d1c81cd30abc08d0f9237e076da6a02d0fc83a26)
ofono: Remove obsolete DUN comment

(cherry picked from commit dae59bddfa1262d7bd24dc478b638824042dcc09)
ofono: fix modem lookup in cm_context_added()

(cherry picked from commit 21ca0158deb5ed000b3622669f38590a0f7a56c8)
ofono: Remove network whenever context is removed

Fixes BMC#24942
(cherry picked from commit c1218a08ffef1992880bd84d4bf9d33e52f9645d)
test: Support the possibility to input multiple parameters into simple-agent

Fixes BMC#24965
(cherry picked from commit b57b82c73c7d2e439440208783c0f142d590f8a6)
ofono: Fix NULL pointer access in set_disconnect()

oFono sends several ConnectionContext.PropertyChanged("Active", False)
after it was told to disconnect.

After studying the oFono part, it looks like that serveral CREGS updates
could trigger oFono to send us the same flag over and over again
(see ofono_gprs_status_notify()).

Even though oFono might missbehave, ConnMan should not crash so
easily. Luckely, the fix is very simple. We should just check if we still
have a valid network pointer before accessing it.

Fixes BMC#25026
(cherry picked from commit 17c6e7cee47f0d22e311592ab3037cbc71885cb4)
Release 0.78.3