Refactor stream_matches_query to early-exit.
Refactor stream_matches_query to early-exit.

For the non-subscribed case, checking flags is a quick
way to reject streams vs. the more expensive indexOf
checks.

shubhamdhama/zulip,kou/zulip,jackrzhang/zulip,rishig/zulip,jackrzhang/zulip,showell/zulip,zulip/zulip,zulip/zulip,synicalsyntax/zulip,dhcrzf/zulip,timabbott/zulip,eeshangarg/zulip,timabbott/zulip,kou/zulip,showell/zulip,eeshangarg/zulip,eeshangarg/zulip,brainwane/zulip,punchagan/zulip,synicalsyntax/zulip,shubhamdhama/zulip,shubhamdhama/zulip,rishig/zulip,andersk/zulip,brainwane/zulip,kou/zulip,rishig/zulip,eeshangarg/zulip,timabbott/zulip,rht/zulip,shubhamdhama/zulip,hackerkid/zulip,rht/zulip,zulip/zulip,shubhamdhama/zulip,punchagan/zulip,rht/zulip,tommyip/zulip,hackerkid/zulip,synicalsyntax/zulip,shubhamdhama/zulip,rht/zulip,synicalsyntax/zulip,rishig/zulip,rht/zulip,dhcrzf/zulip,zulip/zulip,shubhamdhama/zulip,rishig/zulip,dhcrzf/zulip,hackerkid/zulip,brainwane/zulip,synicalsyntax/zulip,rishig/zulip,hackerkid/zulip,brainwane/zulip,kou/zulip,andersk/zulip,timabbott/zulip,jackrzhang/zulip,dhcrzf/zulip,hackerkid/zulip,brainwane/zulip,kou/zulip,eeshangarg/zulip,andersk/zulip,jackrzhang/zulip,eeshangarg/zulip,showell/zulip,andersk/zulip,jackrzhang/zulip,showell/zulip,rht/zulip,synicalsyntax/zulip,punchagan/zulip,dhcrzf/zulip,andersk/zulip,punchagan/zulip,dhcrzf/zulip,dhcrzf/zulip,showell/zulip,zulip/zulip,jackrzhang/zulip,andersk/zulip,tommyip/zulip,punchagan/zulip,hackerkid/zulip,timabbott/zulip,tommyip/zulip,kou/zulip,kou/zulip,brainwane/zulip,showell/zulip,brainwane/zulip,tommyip/zulip,zulip/zulip,punchagan/zulip,zulip/zulip,tommyip/zulip,rht/zulip,timabbott/zulip,eeshangarg/zulip,showell/zulip,punchagan/zulip,andersk/zulip,timabbott/zulip,jackrzhang/zulip,tommyip/zulip,synicalsyntax/zulip,rishig/zulip,tommyip/zulip,hackerkid/zulip