[kernel] fix bug in event_signal with AUTOUNSIGNAL flag
[kernel] fix bug in event_signal with AUTOUNSIGNAL flag

Would not mark the event as unsignalled before potentially
releasing any waiting threads, which would let them fall through
event_wait until the signalling thread was run again.

sndnvaps/lk,utilite2/lk,srodrig1/lk,jcsullins/moboot,MiCode/mi2_lk,GCrean/lk,my4ndr0id/android_bootable_bootloader_lk,Foxda-Tech/argo8-bootable-bootloader-lk,xndcn/moboot-for-veer,Redmi-dev/android_bootable_lk,idor/dk50-bootable_bootloader_lk,pablomarx/lk,grub4android/lk,M1cha/android_bootable_bootloader_lk,Redmi-dev/android_bootable_lk,t2m-foxfone/kernel_lk,M1cha/android_bootable_bootloader_lk,idor/dk50-bootable_bootloader_lk,M1cha/mi2_lk,Foxda-Tech/polaris-bootable-bootloader-lk,Foxda-Tech/argo8-bootable-bootloader-lk,ianloic/lk,zhuotong/mi2_lk_NoEmmc,mozilla-b2g/fairphone2_kernel_lk,M1cha/lk,srodrig1/lk,travisg/lk,DooMLoRD/android_bootable_bootloader_lk,thornbirdblue/codeaurora_lk,detule/lk-g2-spr,minglun-tsai/lk,jbott/lk_gee,jsr-d9/android_kernel_lk,zhuotong/mi2_lk_NoEmmc,oubeichen/lk-v500,M1cha/lk,t2m-foxfone/android_kernel_lk,thornbirdblue/codeaurora_lk,skabet/lk,sndnvaps/lk,RonGokhale/android_lk_bootloader,Blefish/android_bootable_bootloader_lk,GCrean/lk,chirayudesai/android_bootable_bootloader_lk,Foxda-Tech/polaris-bootable-bootloader-lk,M1cha/lktris,M1cha/android_bootable_bootloader_lk,lg-devs/g2-bootloader,Blefish/android_bootable_bootloader_lk,pichina/lk,jbott/lk_gee,Foxda-Tech/argo8-bootable-bootloader-lk,hanjae/lumiab0,hanjae/lumiab0,mozilla-b2g/kernel_lk,jcsullins/moboot,ErikCorryGoogle/lk,beidl/lk_umia,t2m-foxfone/kernel_lk,mozilla-b2g/fairphone2_kernel_lk,chirayudesai/android_bootable_bootloader_lk,littlekernel/lk,CanarySolutions/little-kernel,efidroid/lk,lg-devs/g2-bootloader,M1cha/mi2_lk,ianloic/lk,jcsullins/moboot,mozilla-b2g/kernel_lk,DooMLoRD/android_bootable_bootloader_lk,M1cha/lk,utilite2/lk,pablomarx/lk,RonGokhale/android_lk_bootloader,xndcn/moboot-for-veer,M1cha/lktris,beidl/lk_umia,M1cha/mi2_lk,jbott/lk_gee,hollanderic/lkstuff,littlekernel/lk,idor/dk50-bootable_bootloader_lk,RonGokhale/android_lk_bootloader,pablomarx/lk,Foxda-Tech/polaris-bootable-bootloader-lk,M1cha/mi2_lk,ianloic/lk,t2m-foxfone/kernel_lk,my4ndr0id/android_bootable_bootloader_lk,mozilla-b2g/fairphone2_kernel_lk,minglun-tsai/lk,lg-devs/g2-bootloader,jcsullins/moboot,Redmi-dev/android_bootable_lk,grub4android/lk,hollanderic/lkstuff,MiCode/mi2_lk,idor/dk50-bootable_bootloader_lk,M1cha/lktris,RonGokhale/android_lk_bootloader,skabet/lk,nvll/lk,sndnvaps/lk,M1cha/lk,pichina/lk,jcsullins/moboot,sndnvaps/lk,t2m-foxfone/android_kernel_lk,t2m-foxfone/kernel_lk,Redmi-dev/android_bootable_lk,zhuotong/mi2_lk_NoEmmc,M1cha/mi2_lk,Blefish/android_bootable_bootloader_lk,jsr-d9/android_kernel_lk,thornbirdblue/codeaurora_lk,xndcn/moboot-for-veer,mozilla-b2g/fairphone2_kernel_lk,hanjae/lumiab0,littlekernel/lk,thornbirdblue/codeaurora_lk,grub4android/lk,my4ndr0id/android_bootable_bootloader_lk,srodrig1/lk,M1cha/lk,GCrean/lk,jbott/lk_gee,oubeichen/lk-v500,pichina/lk,GCrean/lk,mozilla-b2g/kernel_lk,jsr-d10/android_bootable_bootloader_lk,t2m-foxfone/android_kernel_lk,hanjae/lumiab0,pablomarx/lk,ianloic/lk,zhuotong/mi2_lk_NoEmmc,littlekernel/lk,zhuotong/mi2_lk_NoEmmc,M1cha/lktris,skabet/lk,M1cha/android_bootable_bootloader_lk,nvll/lk,jsr-d9/android_kernel_lk,Blefish/android_bootable_bootloader_lk,grub4android/lk,Blefish/android_bootable_bootloader_lk,Foxda-Tech/argo8-bootable-bootloader-lk,jsr-d9/android_kernel_lk,efidroid/lk,utilite2/lk,idor/dk50-bootable_bootloader_lk,CanarySolutions/little-kernel,hollanderic/lkstuff,skabet/lk,chirayudesai/android_bootable_bootloader_lk,beidl/lk_umia,MiCode/mi2_lk,GCrean/lk,oubeichen/lk-v500,Redmi-dev/android_bootable_lk,mozilla-b2g/kernel_lk,efidroid/lk,hanjae/lumiab0,t2m-foxfone/kernel_lk,mozilla-b2g/kernel_lk,utilite2/lk,chirayudesai/android_bootable_bootloader_lk,jsr-d10/android_bootable_bootloader_lk,xndcn/moboot-for-veer,jsr-d9/android_kernel_lk,detule/lk-g2-spr,t2m-foxfone/android_kernel_lk,detule/lk-g2-spr,detule/lk-g2-spr,pichina/lk,jsr-d10/android_bootable_bootloader_lk,beidl/lk_umia,ErikCorryGoogle/lk,jsr-d10/android_bootable_bootloader_lk,CanarySolutions/little-kernel,jcsullins/moboot,nvll/lk,lg-devs/g2-bootloader,Foxda-Tech/polaris-bootable-bootloader-lk,efidroid/lk,grub4android/lk,DooMLoRD/android_bootable_bootloader_lk,skabet/lk,hollanderic/lkstuff,detule/lk-g2-spr,my4ndr0id/android_bootable_bootloader_lk,srodrig1/lk,ErikCorryGoogle/lk,travisg/lk,ErikCorryGoogle/lk,nvll/lk,M1cha/android_bootable_bootloader_lk,travisg/lk,minglun-tsai/lk,srodrig1/lk,MiCode/mi2_lk,chirayudesai/android_bootable_bootloader_lk,t2m-foxfone/android_kernel_lk,lg-devs/g2-bootloader,CanarySolutions/little-kernel,utilite2/lk,sndnvaps/lk,thornbirdblue/codeaurora_lk,pichina/lk,DooMLoRD/android_bootable_bootloader_lk,oubeichen/lk-v500,nvll/lk,jsr-d10/android_bootable_bootloader_lk,xndcn/moboot-for-veer,Foxda-Tech/argo8-bootable-bootloader-lk,CanarySolutions/little-kernel,oubeichen/lk-v500,travisg/lk,mozilla-b2g/fairphone2_kernel_lk,RonGokhale/android_lk_bootloader,M1cha/lktris,MiCode/mi2_lk,minglun-tsai/lk,my4ndr0id/android_bootable_bootloader_lk,pablomarx/lk,DooMLoRD/android_bootable_bootloader_lk,efidroid/lk,Foxda-Tech/polaris-bootable-bootloader-lk,M1cha/android_bootable_bootloader_lk,beidl/lk_umia,jbott/lk_gee