actions: Optimize query in get_occupied_streams.
actions: Optimize query in get_occupied_streams.

Using an Exists subquery to avoid scanning the entire Subscription
table seems to speed things up greatly.
Set up with:
 ./manage.py populate_db --extra_users 2000 --extra-streams 1000

Tested on my computer, the original function was taking ~1.2seconds,
the optimized version only ~0.05-0.06.

Likely fixes #13874; we can re-open if after production testing we
feel more work is warranted.

brainwane/zulip,brainwane/zulip,zulip/zulip,hackerkid/zulip,rht/zulip,zulip/zulip,brainwane/zulip,synicalsyntax/zulip,zulip/zulip,synicalsyntax/zulip,punchagan/zulip,showell/zulip,kou/zulip,synicalsyntax/zulip,eeshangarg/zulip,eeshangarg/zulip,timabbott/zulip,eeshangarg/zulip,kou/zulip,showell/zulip,eeshangarg/zulip,zulip/zulip,shubhamdhama/zulip,kou/zulip,punchagan/zulip,shubhamdhama/zulip,rht/zulip,andersk/zulip,shubhamdhama/zulip,hackerkid/zulip,kou/zulip,showell/zulip,zulip/zulip,hackerkid/zulip,kou/zulip,andersk/zulip,andersk/zulip,andersk/zulip,eeshangarg/zulip,andersk/zulip,andersk/zulip,rht/zulip,rht/zulip,synicalsyntax/zulip,zulip/zulip,andersk/zulip,punchagan/zulip,brainwane/zulip,brainwane/zulip,rht/zulip,hackerkid/zulip,punchagan/zulip,hackerkid/zulip,shubhamdhama/zulip,brainwane/zulip,punchagan/zulip,synicalsyntax/zulip,timabbott/zulip,showell/zulip,timabbott/zulip,brainwane/zulip,hackerkid/zulip,hackerkid/zulip,shubhamdhama/zulip,shubhamdhama/zulip,rht/zulip,rht/zulip,showell/zulip,showell/zulip,kou/zulip,synicalsyntax/zulip,punchagan/zulip,timabbott/zulip,showell/zulip,zulip/zulip,eeshangarg/zulip,eeshangarg/zulip,punchagan/zulip,timabbott/zulip,shubhamdhama/zulip,synicalsyntax/zulip,kou/zulip,timabbott/zulip,timabbott/zulip