test_event_queue: Generalize some helpers.
test_event_queue: Generalize some helpers.

This will later allow us to also use these when
writing new tests for bots.

rht/zulip,zulip/zulip,andersk/zulip,rht/zulip,andersk/zulip,zulip/zulip,andersk/zulip,eeshangarg/zulip,kou/zulip,rht/zulip,eeshangarg/zulip,zulip/zulip,kou/zulip,eeshangarg/zulip,zulip/zulip,andersk/zulip,eeshangarg/zulip,rht/zulip,kou/zulip,andersk/zulip,eeshangarg/zulip,kou/zulip,rht/zulip,eeshangarg/zulip,andersk/zulip,kou/zulip,rht/zulip,eeshangarg/zulip,kou/zulip,zulip/zulip,zulip/zulip,rht/zulip,kou/zulip,andersk/zulip,zulip/zulip