Bluetooth: Handle hci_conn timeout in BT_CONNECT

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

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Bluetooth: Track the number of hci_conn in BT_SCAN

In order to avoid traversing the hci_conn list every time we get an
advertising report, we should keep a counter of connections in
BT_SCAN state. This way, we only traverse the list if the counter
is greater from zero.

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>
Bluetooth: Don't set chan_timer for ATT fixed channel

According to Core spec (see Vol 3, Part A, 6.2.1), the channel timer
used to terminate the channel when the remote endpoint is unreponsive
to signaling requests. Since there is no signaling requests in LE ATT
fixed channel, there is no need we setup this timer.

As a side effect, LE connection attempts won't be aborted by the
channel timer anymore. Therefore, SOCK_NONBLOCK LE L2CAP sockets will
be ready (will receive POLLOUT event) when the LE connection is
established.

This patch modifies l2cap_chan_connect function so it doesn't set
the timer if the cid is L2CAP_CID_LE_DATA.

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