messages: Factor out "need to fetch on narrow" logic as a function.
messages: Factor out "need to fetch on narrow" logic as a function.

This better isolates it from the plumbing around it, making both of
them somewhat easier to read and understand.

vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile