Bluetooth: L2CAP: Fix sending double connection request
Bluetooth: L2CAP: Fix sending double connection request

HCI events 'encryption change' and 'encryption key refresh' can trigger
channel ops 'encrypt_change'. For BR/EDR outgoing channel connection setup,
when new security needs to be set over existing one, CoC channel connection
request to remote is on hold since security got precedence. Then when
security procedure ends controller emits these 2 HCI event one by one.
In such case channel ops 'encrypt_change' is called 2 times causing
indirectly resume held request that can in consequence sent two subsequent
connection requests for the same target channel.

> HCI Event: Simple Pairing Complete (0x36) plen 7	[hci1] 132.169432
        Status: Success (0x00)
        Address: 68:17:29:CF:5D:86 (Intel Corporate)
> HCI Event: Link Key Notification (0x18) plen 23	[hci1] 132.191364
        Address: 68:17:29:CF:5D:86 (Intel Corporate)
        Link key: 949749ea9f6e91cae22bbfdeada2f333
        Key type: Authenticated Combination key from P-192 (0x05)
> HCI Event: Encryption Key Refresh Complete (0x30) plen 3	[hci1] 132.222430
        Status: Success (0x00)
        Handle: 72
> HCI Event: Auth Complete (0x06) plen 3	[hci1] 132.224365
        Status: Success (0x00)
        Handle: 72
< ACL Data TX: Handle 72 flags 0x00 dlen 12	[hci1] 132.229865
      L2CAP: Connection Request (0x02) ident 7 len 4
        PSM: 5 (0x0005)
        Source CID: 65
< HCI Command: Set Connection Encryption (0x01|0x0013) plen 3	[hci1] 132.230340
        Handle: 72
        Encryption: Enabled (0x01)
> HCI Event: Number of Completed Packets (0x13) plen 5	[hci1] 132.232363
        Num handles: 1
        Handle: 72
        Count: 1
> HCI Event: Command Status (0x0f) plen 4	[hci1] 132.234361
      Set Connection Encryption (0x01|0x0013) ncmd 1
        Status: Success (0x00)
> HCI Event: Encryption Change (0x08) plen 4	[hci1] 132.235362
        Status: Success (0x00)
        Handle: 72
        Encryption: Enabled with E0 (0x01)
< ACL Data TX: Handle 72 flags 0x00 dlen 12	[hci1] 132.240960
      L2CAP: Connection Request (0x02) ident 8 len 4
        PSM: 5 (0x0005)
        Source CID: 65
> ACL Data RX: Handle 72 flags 0x02 dlen 16	[hci1] 132.245765
      L2CAP: Connection Response (0x03) ident 7 len 8
        Destination CID: 65
        Source CID: 65
        Result: Connection pending (0x0001)
        Status: Authentication pending (0x0001)
> HCI Event: Number of Completed Packets (0x13) plen 5	[hci1] 132.246360
        Num handles: 1
        Handle: 72
        Count: 1
> ACL Data RX: Handle 72 flags 0x02 dlen 16	[hci1] 132.246987
      L2CAP: Connection Response (0x03) ident 8 len 8
        Destination CID: 0
        Source CID: 65
        Result: Connection refused - no resources available (0x0004)
        Status: No further information available (0x0000)

Change-Id: Ib417b0e701d6ac09c988f3aff0276cd488ed9115
Signed-off-by: Arkadiusz Lichwa <a8f3d827a064762faaf15c916aaf7025632f7d7f@tieto.com>

nashif/zephyr,tidyjiang8/zephyr-doc,fbsder/zephyr,bigdinotech/zephyr,fractalclone/zephyr-riscv,galak/zephyr,holtmann/zephyr,zephyriot/zephyr,fractalclone/zephyr-riscv,galak/zephyr,ldts/zephyr,pklazy/zephyr,erwango/zephyr,runchip/zephyr-cc3220,zephyriot/zephyr,ldts/zephyr,aceofall/zephyr-iotos,GiulianoFranchetto/zephyr,explora26/zephyr,GiulianoFranchetto/zephyr,tidyjiang8/zephyr-doc,runchip/zephyr-cc3220,ldts/zephyr,rsalveti/zephyr,ldts/zephyr,pklazy/zephyr,GiulianoFranchetto/zephyr,sharronliu/zephyr,punitvara/zephyr,erwango/zephyr,nashif/zephyr,pklazy/zephyr,runchip/zephyr-cc3200,sharronliu/zephyr,aceofall/zephyr-iotos,punitvara/zephyr,ldts/zephyr,nashif/zephyr,rsalveti/zephyr,zephyrproject-rtos/zephyr,mbolivar/zephyr,finikorg/zephyr,explora26/zephyr,rsalveti/zephyr,runchip/zephyr-cc3220,mbolivar/zephyr,mbolivar/zephyr,holtmann/zephyr,holtmann/zephyr,zephyriot/zephyr,galak/zephyr,aceofall/zephyr-iotos,zephyriot/zephyr,rsalveti/zephyr,nashif/zephyr,punitvara/zephyr,bigdinotech/zephyr,sharronliu/zephyr,explora26/zephyr,nashif/zephyr,tidyjiang8/zephyr-doc,punitvara/zephyr,kraj/zephyr,fbsder/zephyr,GiulianoFranchetto/zephyr,bboozzoo/zephyr,runchip/zephyr-cc3200,sharronliu/zephyr,explora26/zephyr,mbolivar/zephyr,runchip/zephyr-cc3200,fractalclone/zephyr-riscv,explora26/zephyr,mbolivar/zephyr,zephyrproject-rtos/zephyr,bboozzoo/zephyr,GiulianoFranchetto/zephyr,zephyriot/zephyr,fbsder/zephyr,Vudentz/zephyr,runchip/zephyr-cc3200,zephyrproject-rtos/zephyr,erwango/zephyr,zephyrproject-rtos/zephyr,holtmann/zephyr,runchip/zephyr-cc3200,finikorg/zephyr,tidyjiang8/zephyr-doc,Vudentz/zephyr,kraj/zephyr,zephyrproject-rtos/zephyr,pklazy/zephyr,erwango/zephyr,punitvara/zephyr,Vudentz/zephyr,bigdinotech/zephyr,runchip/zephyr-cc3220,pklazy/zephyr,runchip/zephyr-cc3220,Vudentz/zephyr,fractalclone/zephyr-riscv,erwango/zephyr,fractalclone/zephyr-riscv,Vudentz/zephyr,holtmann/zephyr,bboozzoo/zephyr,kraj/zephyr,galak/zephyr,sharronliu/zephyr,kraj/zephyr,aceofall/zephyr-iotos,kraj/zephyr,tidyjiang8/zephyr-doc,fbsder/zephyr,finikorg/zephyr,aceofall/zephyr-iotos,bboozzoo/zephyr,rsalveti/zephyr,bigdinotech/zephyr,bboozzoo/zephyr,bigdinotech/zephyr,finikorg/zephyr,finikorg/zephyr,Vudentz/zephyr,galak/zephyr,fbsder/zephyr