[lib][native][web] Move some types and basic functions out of action-utils.js
Summary:
In the following diff, I'll be splitting out the recovery functions out of action-utils.js, in preparation for a later diff where I will turn them into a React Context.
To avoid require cycles, I'm first taking the shared parts that both the new recovery file and the remaining parts of action-utils.js need access to into a separate file.
Depends on D10579
Test Plan: Flow
Reviewers: inka, varun, tomek
Reviewed By: inka, tomek
Differential Revision: https://phab.comm.dev/D10583