gatttool: Fix Characteristic descriptor discovery

This patch fixes end condition for Characteristic Descriptor Discovery.
This sub-procedure is complete when the Error Response is received and
the Error Code is set to Attribute Not Found or the Find Information
Response has an Attribute Handle that is equal to the Ending Handle of
the request.
hog: Fix segfault when discovering descriptors

Invalid memory was being accessed when discovering the External Report
Reference descriptor.
core: Control connections based on adapter state

This patch disable automatic ATTIO connections when the adapter is
powered down and enable automatic connection when the adapter is powered
on.
core: Use adapter connect list for LE connections

When a connection is needed for a LE device it is added to the adapter
connect list instead of directly connecting the ATT io channel.
mgmt: Add wrapper for Set SSP

Wrap mgmt_set_mode for Set SSP into separate function to be consistent
with other calls and have debug printout.
mgmt: Add wrapper for Set LE

Wrap mgmt_set_mode for Set LE into separate function to be consistent
with other calls and have debug printout.
Rename get_dbus_connection to btd_get_dbus_connection

get_dbus_connection is exported function which can be used by plugins thus
should be prefixed with "btd_"
core: Make D-Bus connection valid for entire bluetoothd lifetime

D-Bus is connected before any subsystem needs to use it and disconnected
only after nothing uses it (i.e. plugins). This is to guarantee that
every call to btd_get_dbus_connection() will return valid DBusConnection
object so various components and plugins do not need to store it
somewhere and care about ref counting.
dbus-common: Remove conn parameter from emit_property_changed

Valid DBusConnection pointer is available static variable 'connection'
so it's it's redundant to pass it as function parameter.
dbus-common: Remove conn parameter from emit_array_property_changed

DBusConnection pointer is already stored in connection static variable
so it's redundant to pass it as function parameter.
manager: Simplify DBusConnection object handling

This patch removes local reference to DBusConnection object and uses
btd_get_dbus_connection() call wherever such object is needed instead.
agent: Simplify DBusConnection object handling

This patch removes local reference to DBusConnection object and uses
btd_get_dbus_connection() call wherever such object is needed instead.

Pointer returned by this call is guaranteed to be valid for entire
bluetoothd lifetime and thus do not need to be refcounted.
device: Simplify DBusConnection object handling

This patch removes redundant references and function parameters for
DBusConnection object and uses btd_get_dbus_connection() call wherever
such object is needed instead.

Pointer returned by this call is guaranteed to be valid for entire
bluetoothd lifetime and thus do not need to be refcounted.
adapter: Simplify DBusConnection object handling

This patch removes redundant references and function parameters for
DBusConnection object and uses btd_get_dbus_connection() call wherever
such object is needed instead.

Pointer returned by this call is guaranteed to be valid for entire
bluetoothd lifetime and thus do not need to be refcounted.
attrib: Simplify DBusConnection object handling

This patch removes redundant references and function parameters for
DBusConnection object and uses btd_get_dbus_connection() call wherever
such object is needed instead.

Pointer returned by this call is guaranteed to be valid for entire
bluetoothd lifetime and thus do not need to be refcounted.
audio: Simplify DBusConnection object handling

This patch removes redundant references and function parameters for
DBusConnection object and uses btd_get_dbus_connection() call wherever
such object is needed instead.

Pointer returned by this call is guaranteed to be valid for entire
bluetoothd lifetime and thus do not need to be refcounted.
health: Simplify DBusConnection object handling

This patch removes redundant references and function parameters for
DBusConnection object and uses btd_get_dbus_connection() call wherever
such object is needed instead.

Pointer returned by this call is guaranteed to be valid for entire
bluetoothd lifetime and thus do not need to be refcounted.
input: Simplify DBusConnection object handling

This patch removes redundant references and function parameters for
DBusConnection object and uses btd_get_dbus_connection() call wherever
such object is needed instead.

Pointer returned by this call is guaranteed to be valid for entire
bluetoothd lifetime and thus do not need to be refcounted.
network: Simplify DBusConnection object handling

This patch removes redundant references and function parameters for
DBusConnection object and uses btd_get_dbus_connection() call wherever
such object is needed instead.

Pointer returned by this call is guaranteed to be valid for entire
bluetoothd lifetime and thus do not need to be refcounted.
sap: Simplify DBusConnection object handling

This patch removes redundant references and function parameters for
DBusConnection object and uses btd_get_dbus_connection() call wherever
such object is needed instead.

Pointer returned by this call is guaranteed to be valid for entire
bluetoothd lifetime and thus do not need to be refcounted.