messages: On initial fetch, load messages from last narrow.
messages: On initial fetch, load messages from last narrow.

Fixes #3162.

When restarting the queue (starting with a `DEAD_QUEUE` action) we
reset the messages' state.  But we do not refetch any messages.  If
the user is currently looking at `ChatScreen` they will encounter a
"No Messages" text, as we have cleared the messages but are not
fetching any.

Any subsequent narrows the user navigates to will be taken care of by
the fetch in `doNarrow`.  But the narrow they're currently looking at
won't have another `doNarrow` and we need to refetch.

Add a refetch of the last narrow's messages in the "initial fetch",
after the new queue is established, and using the same logic that
`doNarrow` uses.

This is also called on application startup, but since the last narrow
is in `session`, it is always empty then and this code does not run.

Note: `needFetchAtFirstUnread` and `fetchMessagesInNarrow` were
moved up in the same file to fix a lint issue 'used before defined'.

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