src/gatt-client: Introduce btd_gatt_client.

This patch introduces struct btd_gatt_client, which intends to
encapsulate the GATT database of a btd_device. btd_gatt_client tracks
attributes of a remote device and exposes them to external applications
via the D-Bus API defined in doc/gatt.

The ultimate goal is to have a single instance of btd_gatt_client for
each btd_device and allow profiles to access attributes through it,
instead of using attio. This is the first of several stages in removing
GAttrib from bluetoothd.
doc/gatt-api: New API properties and methods for the GATT D-Bus API.

This patch introduces the following new properties to the GattService1
interface:

  Device: A remote-service-only property that contains the D-Bus object
  path of the associated device.

  Primary: Reflects whether or not a services is primary or secondary.

This patch also introduces new methods to GattCharacteristic1 and
GattDescriptor1 for reading and writing the corresponding attribute
values and a new signal for being notified of received notifications and
indications.

The "Value" D-Bus property is removed from both interfaces
and replaced with asynchronous ReadValue and WriteValue functions. This
is due to the fact that DBus.Properties.Get is synchronous and without
an asynchronous way of issuing a GATT value read request, there are
cases where a single read and cache based approach becomes limiting
(e.g. when a characteristic allows reads but no notifications) and
relying on the PropertyChanged signal to retrieve the value of a read
request asynchonously as well as to signal notifications/indications
makes for a vague API.
src/gatt-client: Create GattService1 objects for discovered services.

This patch makes btd_gatt_client perform a primary service discovery and
expose GattService1 objects for each one that is discovered.
src/gatt-client: Added GattCharacteristic1 objects.

This patch adds characteristic discovery and creates and exposes
objects with the GattCharacteristic1 interface for each
characteristic discovered.
src/gatt-client: Mark client as initialized after service discovery
src/gatt-client: Implemented the GattCharacteristic1 "Flags" property.

This patch exposes characteristic properties under the "Flags" D-Bus
property of GattCharacteristic1. Properties provided by the
Characteristic Extended Properties descriptor are not yet handled.
src/shared/gatt-client: Implement GattCharacteristic1.ReadValue.

This patch implements the ReadValue method of the
org.bluez.GattCharacteristic1 interface.
src/shared/gatt-client: Implement GattCharacteristic1.WriteValue

This patch implements the WriteValue method of the
org.bluez.GattCharacteristic1 interface.
src/shared/gatt-client: Added GattDescriptor1 objects.

This patch exposes objects with interface GattDescriptor1 for discovered
characteristic descriptors.
src/gatt-client: Implement the GattCharacteristic1.ValueUpdated signal.

This patch implements the ValueUpdated signal for characteristics, so
that a signal is sent for all notifications and indications received for
a characteristic. Notifications and/or indications get enabled
automatically based on the presence of the "notify" and "indicate"
properties and the "Client Characteristic Configuration" descriptor of a
characteristic.
src/gatt-client: Improved logging.

This patch adds increased DBG, error, and info level logging to
btd_gatt_client.
src/gatt-client: Implement GattDescriptor1.ReadValue method.

This patch implements the ReadValue method of the GattDescriptor1
interface.
src/gatt-client: Implement GattDescriptor1.WriteValue.

This patch implements the WriteValue method of the GattDescriptor1
interface.
src/gatt-client: Properly clean up request ids and fix crash.

This patch makes sure that all request ids are properly cleaned up in
case of failure. This patch also fixes a crash that happened during
service cleanup on disconnects caused by the following line:

  client->services = g_slist_append(client->services, services);

where it should be:

  client->services = g_slist_append(client->services, service);

The former appended a GSList pointer instead of a struct
gatt_dbus_service pointer to the client's list of services. This caused
memory corruption during cleanup.