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.
include: Add ofono_emulator_create_card()
emulator: Implement ofono_emulator_create_card()

This patch adds a Handsfree Audio Card to the emulator structure and a
function to create it. When the emulator is about to be removed, its
card is also removed.
hfp_ag_bluez5: Create card when connect

When the HFP AG plugin accepts an incoming connection it now creates a
Handsfree Audio Card for the corresponding emulator.
emulator: Register card when establish SLC

When the service level connection is established, the emulator now
registers its Handsfree Audio Card. This registers a DBus interface
for that card.
emulator: Set local and remote address of card

This commit extracts local and remote address from the socket and
stores them into the Handsfree Audio Card.
hfp_ag_bluez5: Check if card creation fails

If the card creation fails, the HFP AG plugin aborts the connection
and removes the emulator.
include: Add emulator init and cleanup functions
emulator: Implement init and cleanup functions
main: Call emulator init and cleanup functions
emulator: Add HFP 1.6 AG card driver

This commit adds a Handsfree Audio Card driver for HFP AG 1.6.

The current connect implementation is the legacy one (direct SCO
connection without codec negotiation).
emulator: Set card driver

If the version is 1.6, send the corresponding card driver name to card
creation. If the version is not 1.6, send NULL.
hfp_ag_bluez5: Send HFP version to card creation

Extract the version from the fd_properties dictionary, if present.
Fallback to HFP version 1.5 if not present.

After that, send it to the card creation.
hfp_ag_bluez5: Register HFP AG version 1.6
emulator: Add AT+BAC support

When the emulator receives a AT+BAC SET command, it stores the
available HF codecs.
emulator: Add AT+BCC support

This commit verifies the conditions where the AT+BCC command will fail.

The codec connection setup is missing.
emulator: Setup codec connection

This commit sends an unsolicited +BCS command with the selected codec
when the AG receives with success a AT+BCC command.

Currently the codec is hardcoded to CVSD.
emulator: Add AT+BCS support

This commit verifies if the codec id sent by HF is the same as
previous sent by AG.

It also verifies if the emulator is expecting a AT+BCS command. If not,
returns an ERROR.

We also need to unset the bcs flag in AT+BAC handler because it is a
valid +BCS response.
emulator: Resend +BCS after receive AT+BAC

If the AG receives AT+BAC as a response to an unsolicited +BCS, it
will resend +BCS based on new list of available codecs.
emulator: Setup synchronous connection

After respond OK to AT+BCS, the AG should establish a synchronous
connection with HF.