Bluetooth: Change LE connection routine

In order to better support LE connection requirements, such as
multiple connections and re-connections, we should support the
general connection establishment procedure described in Core
spec. Today, we support only the direct connection establishment
procedure which has some limitations and, therefore, requires
extra connection management at user-space in order to support
LE connection requirements.

According to the spec, the general procedure is described as
follows: The host starts scanning for LE devices, once the
device we want to connect to is in-range, the host stops scanning
and initiates a connection. The procedure is terminated when the
connection is established or when the host terminates the procedure.

This patch changes the LE connection routine so we carry out the
general procedure instead of the direct procedure.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Bluetooth: Remove unneeded check in hci_connect_le

Since the LE connection routine now uses the general connection
procedure, it is guaranteed we have no more than one hci_conn
in BT_CONNECT state. So there is no need to check for LE
connections in BT_CONNECT state anymore.

This patch removes the BT_CONNECT check in hci_connect_le.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Bluetooth: Handle hci_conn timeout in BT_SCAN state

If occurs a hci_conn timeout in BT_SCAN state we should stop the
ongoing LE scan.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Bluetooth: Handle one LE connection at the time

For now, we are able to carry out one LE connection request at the
time. So, in order to guarantee there is only one connection attempt,
we should check for LE hci_conn objects in BT_SCAN state.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Bluetooth: Initialize some hci_conn fields earlier

This patch moves some hci_conn fields initialization to hci_connect_le.
There is no reason we initialize them later at hci_le_create_connection.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
WIP: Bluetooth: Remove L2CAP connection timeout

This patch also don't set the l2cap channel timer if it is LE CID.

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