attrib/gattrib: Add g_attrib_get_att.

Added the g_attrib_get_att function which returns the underlying bt_att
structure associated with a GAttrib.
shared/att: Add bt_att_get_fd.

This patch adds a getter for a bt_att structure's underlying connection
file descriptor.
shared/att: Directly close fd on ATT violations.

The existing code handles ATT protocol request timeouts and invalid
incoming request PDUs by cleaning up the io structure via io_destroy.
This doesn't always work, since this only terminates the connection if
io_set_close_on_destroy has been set. Calling io_destroy to force a
disconnect also has the added side-effect of not invoking the disconnect
callback registered with struct io.

This patch fixes these by calling close directly on the file descriptor
when required by the ATT protocol specification. This both cleans up the
connection regardless of whether or not close_on_unref has been set, and
it triggers the disconnect callback via an EPOLLHUP event.
shared/gatt-client: Call ready_handler only in init.

Currently disconnect_cb calls ready_handler to notify the upper layer
if a disconnect occurred during initialization. This patch fixes it so
that the handler is only called if in_init is set.
core: device: Use bt_att_register_disconnect.

btd_device is now notified of ATT channel disconnections by registering
a disconnect handler with bt_att instead of setting up an io watch with
the GIOChannel.
core: device: Use shared/gatt-client for GATT.

This patch changes the GATT service discovery code path with the
following:
   - As part for device_attach_attrib, a bt_gatt_client structure is
   created that performs MTU exchange and service discovery, caches the
   services in an internal list, and handles the remote GATT service.

   - The device_browse_primary code path obtains service information
   by iterating through bt_gatt_client's services, instead of directly
   initiating primary and secondary service discovery using attrib/gatt.
   If the bt_gatt_client isn't ready at the time, the code defers
   registration of services and profile probing until the ready handler
   is called.

   - The attio connected callbacks are invoked from bt_gatt_client's
   ready handler instead of device_attach_attrib.
core: Introduce gatt-callbacks

This patch introduces src/gatt-callbacks.h. This defines API functions
to get notified of bt_gatt_client related events, such as ready,
service changed, and disconnects. This is orthogonal and similar to the
existing attio.h functions, which we're aiming to deprecate.
profiles/gatt: Don't handle GATT service.

ATT MTU exchange and handling of indications from the "Service Changed"
characteristic are now handled by shared/gatt-client, so this profile
should only deal with the GAP service.
profiles/gatt: Rename profile to gap.

Since this built in profile only handles the GAP service, this patch renames it
to gap.
profiles/gap: Rewrite using bt_gatt_client.

This patch rewrites the GAP profile to use the shared GATT stack instead
of GAttrib. The profile now also handles the Device Name characteristic.
profiles/gap: Add Google copyright.

Added Google Inc. to the copyright comment since we mostly rewrote this
profile.
TODO: Update GAttrib related items.

Updated TODOs related to the daemon transition from attrib/ to
shared/gatt.