Bluetooth: controller: Fix assert due to stale tick count
Bluetooth: controller: Fix assert due to stale tick count

Fixed assert due to stale tick count in role event
preparation. This happens when ticker timeout expiry is
delayed from the requested realtime anchor, due to thread
mode processing overheads and occurring interrupts therein,
if any, that added a delay between requested anchor tick
and actual scheduling for the requested ticker timeout.

The assert is reproduced in bt shell by starting advertising
and following it with continuous scanning (interval 2.5ms,
window 2.5ms), on nRF51x. If the overheads and/or a
advertiser event delayed the scheduling of scanner by over
2.5ms, then the preparation of scanner asserted.

The assert has been fixed by checking for stale tick count
at expiry in role event preparation and skip the event
gracefully.

Signed-off-by: Vinayak Kariappa Chettimada <e780c9f87dc729ad454f47292ad82c8652353064@nordicsemi.no>

Vudentz/zephyr,ldts/zephyr,mbolivar/zephyr,Vudentz/zephyr,holtmann/zephyr,zephyriot/zephyr,nashif/zephyr,ldts/zephyr,runchip/zephyr-cc3220,zephyrproject-rtos/zephyr,rsalveti/zephyr,rsalveti/zephyr,aceofall/zephyr-iotos,nashif/zephyr,galak/zephyr,fbsder/zephyr,kraj/zephyr,explora26/zephyr,ldts/zephyr,aceofall/zephyr-iotos,explora26/zephyr,aceofall/zephyr-iotos,runchip/zephyr-cc3220,zephyrproject-rtos/zephyr,punitvara/zephyr,zephyriot/zephyr,kraj/zephyr,fractalclone/zephyr-riscv,Vudentz/zephyr,explora26/zephyr,zephyriot/zephyr,mbolivar/zephyr,Vudentz/zephyr,Vudentz/zephyr,finikorg/zephyr,aceofall/zephyr-iotos,nashif/zephyr,ldts/zephyr,runchip/zephyr-cc3220,fbsder/zephyr,holtmann/zephyr,rsalveti/zephyr,fbsder/zephyr,holtmann/zephyr,finikorg/zephyr,fbsder/zephyr,mbolivar/zephyr,holtmann/zephyr,zephyrproject-rtos/zephyr,aceofall/zephyr-iotos,fractalclone/zephyr-riscv,finikorg/zephyr,fractalclone/zephyr-riscv,punitvara/zephyr,zephyrproject-rtos/zephyr,punitvara/zephyr,explora26/zephyr,punitvara/zephyr,finikorg/zephyr,GiulianoFranchetto/zephyr,kraj/zephyr,rsalveti/zephyr,mbolivar/zephyr,explora26/zephyr,GiulianoFranchetto/zephyr,fbsder/zephyr,zephyriot/zephyr,kraj/zephyr,galak/zephyr,ldts/zephyr,rsalveti/zephyr,fractalclone/zephyr-riscv,zephyriot/zephyr,mbolivar/zephyr,galak/zephyr,nashif/zephyr,GiulianoFranchetto/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,fractalclone/zephyr-riscv,GiulianoFranchetto/zephyr,kraj/zephyr,GiulianoFranchetto/zephyr,runchip/zephyr-cc3220,punitvara/zephyr,finikorg/zephyr,nashif/zephyr,holtmann/zephyr,runchip/zephyr-cc3220,galak/zephyr,Vudentz/zephyr