[native] Pull useSelectAndUploadFromGallery out of Edit[User/Thread]Avatar
Summary:
Pull out common functionality from Edit[User/Thread]Avatar and move to newly introduced avatar-hooks.js.
Added entry to editAvatarOptions in both components to consume this hook.
Depends on D7497
Test Plan:
- Click on pencil icon
- Ensure that the system media gallery appears as expected
- Ensure that the selection is processed as expected (logging + breakpoint)
- Ensure that selected image appears in keyserver uploads table:
Reviewers: ashoat, ginsu
Reviewed By: ashoat
Subscribers: tomek
Differential Revision: https://phab.comm.dev/D7498