Bluetooth: Temporarily background scanning on Discovery

If the user send a mgmt start discovery command while the background
scanning is running, we should temporarily stop it. Once the discovery
finishes, we start the background scanning again.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Bluetooth: Fix hci_untrigger_background_scan()

If device discovery is running, we should not stop the scanning in
hci_untrigger_background_scan(). Otherwise, we brake the discovery
state machine.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Bluetooth: Fix initiate_le_connection()

When a LE device we want automatically connect to is found during the
device discovery procedure, we initiate the connection. Since some LE
controllers don't support scanning and initiating state combination,
the scanning will be disabled and, therefore, we should set the
discovery state to DISCOVERY_STOPPED

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>