Effectively D8343, but for updateImageUserAvatar instead of setUserAvatar.
The registrationMode-related code is native-specific and was pretty interwoven with the logic in setUserAvatar/updateImageUserAvatar.
This diff decouples native-specific from updateImageUserAvatar and moves it to nativeUpdateImageUserAvatar.
As of this diff, updateImageUserAvatar is NOT yet platform-agnostic. We still need to pull out uploadSelectedMedia and want the function to take ImageAvatarDBContent instead of the native-specific NativeMediaSelection. The next diff will address this.
Depends on D8344