include: Add ofono_handsfree_card_set_codec()

This will be used by the drivers that a given codec was negotiated
for a card.

It will return FALSE if the codec can't be used. For example, if the selected
codec is mSBC and defer setup is not supported by the kernel.
handsfree-audio: Implement ofono_handsfree_card_set_codec()
hfp_hf_bluez5: Watch for changes in the selected codec

This patch adds a function to monitor when the AG sends a new codec
before establishing the SCO connection.
handsfree-audio: Send the selected codec

This patch removes the hard-coded CVSD codec, and adds the selected
codec in the NewConnection method call, notifying the agent the codec
previously selected for the audio connection.
handsfree-audio: Keep track whether defer_setup is enabled

'defer_setup' will be one of the inputs when enabling or disabling
support for wideband speech codecs, we will only enable wideband
speech support if the kernel supports deferred setup.

So, we have to have this information available, in this case it means
a global variable.
handsfree-audio: Toggle wideband support when the agent registers

Each time an agent registers itself, we check if we support deferred
setup and if the agent has mSBC as a codec, if both checks are true,
we enable wideband speech support.
emulator: Change feature check to attend HFP 1.6

HFP 1.6 adds a new feature called Codec Negotitation. For the HF Role,
this feature is stored in bit 8 of the supported features
bitmap.

This patch changes the range of valid HF feature bitmaps to 2^8-1.
bluetooth: Add define for SCO voice settings

Add defines for SCO voice setting (Air Coding). Air mode "Transparent
Data" shall be supported if wide band speech is supported.
handsfree-audio: Add setting SCO air mode
test: Create simple-handsfree-audio-agent

This python tool implements the org.ofono.HandsfreeAudioAgent interface,
dealing with the SCO file descriptor passed by the Handsfree Audio
Manager.
hfp_hf_bluez5: Handle org.bluez.Profile1.Cancel()

Cancel() will be called when the ConnectProfile() is called, perhaps
even replied with a success, and the user cancels the connection
attempt.
hfp_hf_bluez5: Handle org.bluez.Profile1.Release()

There's nothing we can do in this case, so we only reply with a
success.
handsfree-audio: Fix replying to an empty D-Bus message

In the case that ofono_handsfree_card_connect_sco() is called outside
the context of a .Connect() call, there's no message we need to reply.
hfp_ag_bluez5: Create a hash to store connections

We need to store active connections so we can disconnect them at
RequestDisconnect().
hfp_ag_bluez5: Store fd in hash when connect

The file descriptor is stored after the emulator is registered.
hfp_ag_bluez5: Remove fd from hash when disconnect

When a RequestDisconnect() is received, the file descriptor must be
closed. This way, the related emulator will be freed.

But the emulator can also be disconnected automatically if its
GAtServer closes. In this case, the hash will hold an invalid file
descriptor.

So, after the emulator is registered, we watch for G_IO_HUP in
the corresponding file descriptor. If this condition happens, we
can safely remove the file descriptor from the hash.
include: Add ofono_emulator_create_card()
emulator: Add Handsfree Audio Card to emulator
emulator: Register card when establish SLC
hfp_ag_bluez5: Create card for emulator when connect