AVDTP: Do not keep a internal reference

Don't initialize reference with 1, instead always start disconnect timer
when reference drops to 0, so in case nobody reclaims the session it
automatically disconnect after 1 second and frees the memory.
build-sys: Disable deprecated warnings

There's not much point in having -Wdeprecated-declarations in this
version of BlueZ. Right now it's throwing the following warning:

audio/gstavdtpsink.c: In function 'gst_avdtp_sink_finalize':
audio/gstavdtpsink.c:198:2: error: 'g_mutex_free' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:273) [-Werror=deprecated-declarations]
audio/gstavdtpsink.c: In function 'gst_avdtp_sink_init':
audio/gstavdtpsink.c:1049:2: error: 'g_mutex_new' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:271) [-Werror=deprecated-declarations]
cc1: all warnings being treated as errors
audio/gsta2dpsink.c: In function 'gst_a2dp_sink_finalize':
audio/gsta2dpsink.c:82:2: error: 'g_mutex_free' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:273) [-Werror=deprecated-declarations]
audio/gsta2dpsink.c: In function 'gst_a2dp_sink_init':
audio/gsta2dpsink.c:711:2: error: 'g_mutex_new' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:271) [-Werror=deprecated-declarations]
cc1: all warnings being treated as errors

These functions were already removed from upstream, so there's not much
point in applying a patch upstream and backporting it. So use
-Wno-deprecated-functions instead.
AVDTP: Support canceling discovery

Extend the internal API to cancel an ongoing session discovery.
source: Cancel connection attempt if Disconnect()

If a Disconnect() call is received while there is an ongoing connection
attempt, cancel it. If an AVDTP discovery is in process, cancel it.
gateway: Trivial variable rename to tmp_rfcomm

Follow the naming in headset.c to rename the prior gw->incoming to
gw->tmp_rfcomm, which is more generic.
gateway: Refactor to remove unregister_incoming()

Close the temporary RFCOMM inside gateway_close(), instead of having a
specific function to handle this.
gateway: Fix not closing temporary RFCOMM

If the gateway is closed during the RFCOMM stablishment (after service
records are gathered) the temporary RFCOMM channel was not closed. Fix
this by storing the channel reference in gw->tmp_rfcomm also for
outgoing connections.
gateway: Cancel discovery in gateway_close()

If service discovery is ongoing when gateway_close() is reached, cancel
it immediately.
gateway: Fix missing dbus_message_unref() calls

gw->msg was referenced with dbus_message_ref() but never unreferenced
correspondingly with dbus_message_unref().
gateway: Fix potential messages without reply

If gateway_close() is called while a pending connection call exists,
send a reply with a generic error message.
gateway: Cancel connection attempt if Disconnect()

If a Disconnect() call is received while there is an ongoing connection
attempt, cancel it. If an service discovery is in process or RFCOMM is
being stablished, cancel them.
Propagate disconnect reason to adapter

Internally propagate disconnect reason.
Propagate disconnect reason to device

Internally propagate disconnect reason in order to make it public in the
D-Bus API.
Send D-Bus signal to propagate disconnect reason

Propagate the disconnection reason through D-Bus, allowing other
components to react accordingly.
doc: Add D-Bus signal to provide disconnect reason

This signal is needed to propagate the reason in case of disconnection.
Some use-cases require this information, for example if there is a
policy to automatically reconnect in case of connection timeout.