[lib/native] introduce useUpdateThemePreference
Summary:
We are going to want this exact logic in our web AppearanceChangeModal. Rather than copy + paste this logic, this diff preemptively factors out this logic into a seperate hook that can be conusmed by each platform
Part of https://linear.app/comm/issue/ENG-4958/update-theme-based-on-the-active-theme-redux-state
Depends on D9552
Test Plan: flow + confirmed that there were no regressions with updating the app theme
Reviewers: atul, inka, rohan
Reviewed By: atul
Subscribers: ashoat, tomek, wyilio
Differential Revision: https://phab.comm.dev/D9553