Similar logic to D7402 but for thread avatars. In addition to creating the selector, I needed to create a small utility function: getAvatarForThread which factors out most of the logic in useAvatarForThread but now we can easily use this logic in the savedEmojiAvatarSelectorForThread selector
Depends on D7424