[native] introduce useUploadSelectedMedia hook
Summary: First step in the great avatars refactor/cleanup. Created this diff to factor out all the logic for uploading and preparing an image selection to be saved by the set avatar endpoints, which was really long and making it difficult to read/work in the avatar-hooks file.
Test Plan: Tested that I could still upload image avatar through this hook, and that the correct loading states for either user avatar or thread avatars were being changed during the image avatar creation flow
Reviewers: ashoat, atul
Reviewed By: ashoat
Subscribers: ashoat, tomek, atul
Differential Revision: https://phab.comm.dev/D7554