tests: Factor out common non-api rate-limit assert function.
tests: Factor out common non-api rate-limit assert function.

The same `assert_func` is used in multiple places, for non-API
requests.  Factor it out and make it a flag to do_test_hit_ratelimits.

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