ipconfig: Fix potential memory leak in __connman_ipconfig_newaddr()
config: Handle IN_MOVED_TO inotify event

If the user moves a .config to /var/lib/connman which happens to be on
the same fs, this will raise IN_MOVED_FROM/IN_MOVE_TO inotify events
and not IN_DELETE/IN_CREATE.
proxy: Remove timeout on proxy cleanup

Make sure the timeout source is cleaned when proxy_lookup struct is
deallocated.
service: Document all 'Error' property values
Support connecting to bluetooth GN and PANU roles

Bluetooth PAN specifies three different roles for different types of
network connections, PANU, NAP and GN. ConnMan currently supports NAP
but ignores the other roles. This patch adds support for the GN and
PANU roles so that we can connect to devices that don't offer NAP.

In the case that a device provides more than one role, we prefer NAP
over GN and GN over PANU. ConnMan will only use the most preferred role
and ignore the others so that we don't have duplicate services in
ConnMan.
AUTHORS: Mention David's contributions
Fix preferred bluetooth role matching.

This fixes an error in the proxy_get_role fuction in commit
6f6927236fc35429eecb1b1459ea5e20ab667db8.

The comment was correct as to what we want to accomplish here, however the
programming logic did not match what the comment says. Now it correctly
returns the most preferred role instead of just the first matching role.
Fix crash when role is NULL.

This fixes a crash that was introduced in commit
6f6927236fc35429eecb1b1459ea5e20ab667db8. It is possible for the role
to be NULL, which caused a crash in strcmp.
ofono: Fix memory leak

Free connman_ipaddress prior to allocating the new one.
wifi: scan all channels when connected

If the wifi interface is connected and a scan is requested via dbus,
only the channels from connectable services will be scanned.  This
leaves few options to fill out a UI with a fresh list of available
services when already connected.

Fix this by performing a wifi_scan_simple() when connected.
AUTHORS: Mention Jason's contributions
wifi: do not start autoscan while connected

When wifi is connected, requesting a scan via dbus causes autoscan
to start.  This is undesired during a connection as it may cause service
interruptions while the wifi device is off-channel.

Fix this by only starting autoscan when wifi is not connected.
technology: Set P2P state according to saved and configured values

As the P2P technology does not have any devices or rfkill switches associated
with it, unconditionally enable or disable the technology when it is created.
When creating the P2P technology, also take the WiFi powered state into
account.
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.
AUTHORS: Mention Erik's contributions
inotify: Fix buffer size

Fix buffer to which inotify events are read to be large enough,
according to inotify(7) manual page.
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.
util: Use proper source for random numbers

Use /dev/urandom as the proper source for random numbers. Use libc
as a fallback if /dev/urandom does not exist or becomes unreadable.
dnsproxy: Use the newly provided function for getting random values
dhcpv6: Use the newly provided function for getting random values