recent_topics: Extract arrow key navigation into seperate functions.
recent_topics: Extract arrow key navigation into seperate functions.

This is preperatory commit for #21654.
We extract the logic for arrow key navigation when focused on table to
separate functions so it is easy to add more functionality in future
and will not clutter the switch block.

Fixes a part of: #21654

rht/zulip,zulip/zulip,zulip/zulip,andersk/zulip,rht/zulip,andersk/zulip,rht/zulip,andersk/zulip,zulip/zulip,rht/zulip,andersk/zulip,zulip/zulip,andersk/zulip,zulip/zulip,rht/zulip,andersk/zulip,zulip/zulip,rht/zulip,zulip/zulip,rht/zulip,andersk/zulip