refactor: Extract subs.get_stream_id_buckets().
refactor: Extract subs.get_stream_id_buckets().

This pulls the essential bucketing/sorting logic out
of filter_table().

The diff isn't quite as clean as I'd like, but some
of the code that got added back to filter_table() can be
eliminated in the future.  Basically, all the stuff
related to hidden ids can just be zapped if we go
to an approach of just re-building the DOM cleanly
whenever our filters change.

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