[native] improve factoring out redundant logic for saving an image thread avatar
Summary:
This diff factors out the update image avatar logic into its own function. This logic is directly shared and used by both the edit image avatar through gallery and camera. So I factored this logic out here in anticipation of the introduction of the edit thread avatar camera modal which is introduced in the next diff
Depends on D7644
Test Plan: flow and setting an image thread avatar still works with the expected behavior
Reviewers: ashoat, atul
Reviewed By: ashoat
Subscribers: ashoat, tomek, atul
Differential Revision: https://phab.comm.dev/D7645