Add a "global" parameter to ApiOptions which allows it to update or
override global preferences.
Bug: T323076
Depends-On: I686c0091768ed330683fff89201fae4f93b8a1c4
Change-Id: Ieb2d0c0d0da5c51b2a47ed8a967a47b4e7ad4577
This gives us the flexibility to add features to core without
affecting GlobalPreferences.
Split getUserForUpdates() into asserting and non-asserting variants
since most things are using it without checking for a null return.
Bug: T323076
Change-Id: I53e5c409a650397fde03a8578b0182f0b97927a9