mypy: Properly annotate generic_bulk_cached_fetch.
mypy: Properly annotate generic_bulk_cached_fetch.

Along with fixing some minor bugs, this requires extracting out the
default functions so that we can do type: ignores on them properly.

While we're at it, we switch to the Python 3 syntax.

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