[lib][web][native] Refactor currentAsOfSelector
Summary: issue: https://linear.app/comm/issue/ENG-5002/refactor-currentasofselector
Test Plan: Tested currentAsOfSelector, sessionStateFuncSelector, noDataAfterPolicyAcknowledgmentSelector by calling useSelector(selector('256')); and printing the result. Tested the openSocketSelector by running the app and checking that it is possible to send messages
Reviewers: michal, kamil, ginsu
Reviewed By: kamil
Subscribers: ashoat, tomek, wyilio
Differential Revision: https://phab.comm.dev/D9684