Core/SAI: Implement three more event phases which makes a total of 9 (from 6).

Ref. #11486
Core/SAI: I need more sleep...
Misc: Minor cosmetic changes here and there
DB/SAI: Fix Aludane Whitecloud spawing adds
Misc: Fix warnings
Merge remote-tracking branch 'origin/master'