I observed an issue where the message fetch here ends up triggered MessageStorePruner. Normally, a message fetch can only happen when the viewer is looking at a thread, which results in lastNavigatedTo being bumped, which prevents MessageStorePruner from immediately triggering. But in the linked code the message fetch doesn't happen when the viewer is looking at a thread.
We could introduce a new action here to also bump lastNavigatedTo, but I don't think it's needed... if we can't get an acceptable MessagePreview within the first defaultNumberPerThread (unlikely), it's probably fine to just default to mostRecentMessageInfo, even though it's failing the showInMessagePreview check.
This diff simply introduces a numMessagesToFetch param to useFetchMessages, which will allow us to fetch just underneath the number we need to avoid MessageStorePruner being triggered. The next diff will adjust the code linked above.
Depends on D14399