[lib] introduce getDefaultAvatar helper function
Summary: This logic will be used for both user and thread avatars so introduced getDefaultAvatar which is a helper function so I wouldn't need to copy/paste the logic in both places
Test Plan: flow and user avatars still render as expected with this new helper function. This diff will be further tested in subsequent diffs as well
Reviewers: ashoat, atul
Reviewed By: ashoat
Subscribers: ashoat, tomek, atul
Differential Revision: https://phab.comm.dev/D7131