[lib] Introduce shared getRelationshipDispatchAction function
Summary: Move part of the logic responsible for selecting correct RelationshipAction basing on provided RelationshipButton to lib so it could be resused on web
Test Plan: Confirm the existing logic still worrks on native
Reviewers: tomek, atul
Reviewed By: tomek
Subscribers: ashoat, adrian, abosh
Differential Revision: https://phab.comm.dev/D4677