[native] Introduce useNativeSetUserAvatar and use throughout native
Summary:
Basically D8339 but for setUserAvatar instead of updateImageUserAvatar.
setUserAvatar in *EditUserAvatarProvider previously had a call to displayFailureAlert(...). However, this function is only relevant on native since we don't display alerts on web.
As part of making EditUserAvatarProvider platform-agnostic, we introduce the useNativeSetUserAvatar hook. It wraps the platform-agnostic setUserAvatar with a try/catch which displays an alert on native if an exception is caught in the catch block.
We replace usages of setUserAvatar on native with nativeSetUserAvatar (which is "created" via the hook).
This removes the final usage of displayFailureAlert in *EditUserAvatarProvider, so I'll remove the prop altogether in the next diff (to avoid cluttering up this one).
Depends on D8340
Test Plan: The modified flows continue to work as expected. When intentionally breaking the update_user_avatar endpoint, the alert continues to surface as expected.
Reviewers: ashoat, ginsu, rohan
Reviewed By: ashoat
Subscribers: tomek
Differential Revision: https://phab.comm.dev/D8341