[connman] Do not trigger __connman_agent_request_connection on dns error

Remove all related code as well.
[connman] storage: add init and cleanup routines

In preparation to storage optimization, add storage init and cleanup
routines that are to be called before storage is used.
[connman] inotify: add user_data pointer to inotify callback

It's useful to have a callback data pointer to handle events from
multiple locations in the same callback. Any memory allocated for
the pointer should be released in a GDestroyNotify callback which
can be given as a registration parameter along with the user data
pointer.
[connman] storage: cache service and provider information

Instead of browsing STORAGEDIR every time connman_storage_get_services
or connman_storage_get_providers is called, read directory contents
once into a cache that is updated based on inotify events.
[connman] storage: Settings file read caching

Implemented a read cache for settings files, so that files are not needlessly
read and parsed every time some configuration values is needed. To keep things
simple, any modification of the file on disk will drop the corresponding cache
entry and on next access the file will be re-read.

In order for caching to work, replaced g_key_file_free() with g_key_file_unref()
overall.
[connman] storage: Debug routines

Added debug functions to print out inotify events and
current service list contents.
Revert "[connman] fix crash when dbus message is NULL"

This reverts commit 7cc3b8b0fa39343fcd12a52b14c87b805464f636.
agent-connman: Fix crash due to NULL D-Bus reply message

When an outstanding request browser call is cancelled, the D-Bus reply
will be set to NULL. Check the reply message before acting on it.
Merge pull request #167 from tigeli/replyfix

[connman] browser_reply_data->callback needs to be called also in the cancelled case
Merge pull request #148 from tigeli/remove_dns_trigger_v2

[connman] Do not trigger __connman_agent_request_connection on dns error
[connman] inotify: fix buffer size

Fix buffer to which inotify events are read to be large enough,
according to inotify(7) manual page.
[connman] inotify: refcount struct connman_inotify

When processing inotify events, callbacks may unregister which can
result in freeing the related connman_inotify struct. However that
struct is referenced in the loop which processes the events read in.

Implement reference counting to make sure the structure is available
while events are being processed.
Merge pull request #159 from hmallat/storage-optimization

Storage optimization
[connman] Start/stop ntp activity when TimeUpdates property is changed

When manual mode was selected, ongoing ntp activity was not stopped and
system time got changed at the next ntp poll time.

Calling __connman_timeserver_sync() after the time_updates_config
variable has been changed causes ntp activity to be stopped when
manual mode is selected and restarted when auto mode is selected.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
Merge pull request #169 from spiiroin/timeupdates_property_change

Start/stop ntp activity when TimeUpdates property is changed
[connman] Fix compiler switch-warning