[lib][native][web] Extract sidebar utils to separate file
Summary:
Helping resolve import cycles in D12073.
Depends on D12101
Test Plan: Flow and CI
Reviewers: inka
Reviewed By: inka
Subscribers: tomek
Differential Revision: https://phab.comm.dev/D12102