core: Print device ref counting
gatt: Force discovery

This patch fixes repeated entries in the attribute database if the
bonding or discovery fails and the core calls again Pair or Connect.
Bonding and discovery happens in parallel, some entries in the database
may already be added when bonding fails.
gatt: Use g_direct hash instead of g_int

This patch replaces g_direct_hash by g_int_hash. Direct hash functions
are more suitable for pointers.
gatt: Fix GAttrib reference couting

This patch fixes invalid read when the following methods are called
on this sequence: Pair(), Disconnect(), Connect(), Remove()
bluetoothd[1731]: attrib/gattrib.c:g_attrib_unref() 0x479a4c8: ref=0
==1731== Invalid read of size 4
==1731==    at 0x80984D2: g_attrib_cancel_all (gattrib.c:638)
==1731==    by 0x80C2633: channel_remove (gatt.c:1995)
==1731==    by 0x4079B43: g_source_callback_unref (gmain.c:1288)
==1731==    by 0x4079750: g_source_destroy_internal (gmain.c:957)
==1731==    by 0x407BDDD: g_main_context_dispatch (gmain.c:2563)
==1731==    by 0x407C124: g_main_context_iterate.isra.21 (gmain.c:3146)
==1731==    by 0x407C56A: g_main_loop_run (gmain.c:3340)
==1731==    by 0x41BA4D2: (below main) (libc-start.c:226)
==1731==  Address 0x479a4e4 is 28 bytes inside a block of size 56 free'd
==1731==    at 0x402AF79: free (vg_replace_malloc.c:446)
==1731==    by 0x4081D0A: standard_free (gmem.c:98)
==1731==    by 0x80979B7: g_attrib_unref (gattrib.c:237)
==1731==    by 0x80C4BC9: btd_gatt_disconnect (gatt.c:3120)
==1731==    by 0x80BE3ED: btd_service_disconnect (service.c:238)
==1731==    by 0x80C3C88: channel_watch_cb (gatt.c:2650)
gatt: Fix missing reply for re-connection

This patch fixes a missing D-Bus for Connect or ConnectProfiles when
the attributes are discovered already.
core: Fix invalid read when removing device while in GATT discovery