Fix user switching race condition on boot

With HSUM, a switch is done immediately on boot to the main
user. This can occur as SystemUI is being initialized, leading
it to miss the "onUserSwitching" event, which performs critical
setup for the upcoming user.

If a switch is in progress during boot, manually send that event.

Also, fix a crash in the contentprovider during this user switch.

Fixes: 365707550
Test: atest UserTrackerImplTest
Test: manual - setup multiple users, one with security NONE, reboot
Flag: EXEMPT bugfix
Change-Id: Idf1403f7115c07c20c0514beb89af554aeb7bbc8
8 files changed