zerver/lib/events: Refactor fetch_initial_state_data.
zerver/lib/events: Refactor fetch_initial_state_data.

This Refactors the function fetch_initial_state_data to use the
realm.property_types attribute, avoiding some unnecessary code
duplication.

Tweaked slightly by tabbott to simplify the code a bit.

Addresses part of issue #3854.

jphilipsen05/zulip,vaidap/zulip,rishig/zulip,tommyip/zulip,SmartPeople/zulip,brainwane/zulip,amanharitsh123/zulip,ryanbackman/zulip,tommyip/zulip,showell/zulip,ryanbackman/zulip,vaidap/zulip,christi3k/zulip,synicalsyntax/zulip,tommyip/zulip,dhcrzf/zulip,vabs22/zulip,christi3k/zulip,ryanbackman/zulip,Galexrt/zulip,dhcrzf/zulip,vabs22/zulip,shubhamdhama/zulip,vabs22/zulip,andersk/zulip,shubhamdhama/zulip,shubhamdhama/zulip,christi3k/zulip,verma-varsha/zulip,SmartPeople/zulip,timabbott/zulip,dhcrzf/zulip,zulip/zulip,verma-varsha/zulip,zulip/zulip,jrowan/zulip,synicalsyntax/zulip,zulip/zulip,shubhamdhama/zulip,rht/zulip,jackrzhang/zulip,jackrzhang/zulip,mahim97/zulip,showell/zulip,j831/zulip,jackrzhang/zulip,brockwhittaker/zulip,mahim97/zulip,jphilipsen05/zulip,mahim97/zulip,shubhamdhama/zulip,rishig/zulip,kou/zulip,j831/zulip,hackerkid/zulip,hackerkid/zulip,zulip/zulip,jrowan/zulip,ryanbackman/zulip,jackrzhang/zulip,vabs22/zulip,tommyip/zulip,punchagan/zulip,rht/zulip,mahim97/zulip,synicalsyntax/zulip,showell/zulip,vaidap/zulip,jackrzhang/zulip,hackerkid/zulip,tommyip/zulip,kou/zulip,eeshangarg/zulip,kou/zulip,Galexrt/zulip,synicalsyntax/zulip,andersk/zulip,hackerkid/zulip,synicalsyntax/zulip,j831/zulip,brainwane/zulip,andersk/zulip,eeshangarg/zulip,hackerkid/zulip,jrowan/zulip,amanharitsh123/zulip,vaidap/zulip,andersk/zulip,mahim97/zulip,punchagan/zulip,Galexrt/zulip,jackrzhang/zulip,showell/zulip,zulip/zulip,Galexrt/zulip,rht/zulip,tommyip/zulip,j831/zulip,rishig/zulip,mahim97/zulip,brockwhittaker/zulip,brainwane/zulip,rishig/zulip,Galexrt/zulip,christi3k/zulip,Galexrt/zulip,zulip/zulip,vabs22/zulip,jphilipsen05/zulip,timabbott/zulip,punchagan/zulip,timabbott/zulip,punchagan/zulip,andersk/zulip,amanharitsh123/zulip,brockwhittaker/zulip,jrowan/zulip,Galexrt/zulip,j831/zulip,brockwhittaker/zulip,showell/zulip,punchagan/zulip,dhcrzf/zulip,rishig/zulip,SmartPeople/zulip,jrowan/zulip,verma-varsha/zulip,andersk/zulip,punchagan/zulip,rht/zulip,ryanbackman/zulip,timabbott/zulip,rishig/zulip,rht/zulip,andersk/zulip,kou/zulip,vabs22/zulip,brockwhittaker/zulip,synicalsyntax/zulip,rishig/zulip,shubhamdhama/zulip,dhcrzf/zulip,showell/zulip,timabbott/zulip,zulip/zulip,brainwane/zulip,SmartPeople/zulip,eeshangarg/zulip,jackrzhang/zulip,eeshangarg/zulip,kou/zulip,synicalsyntax/zulip,dhcrzf/zulip,tommyip/zulip,kou/zulip,amanharitsh123/zulip,SmartPeople/zulip,vaidap/zulip,verma-varsha/zulip,jphilipsen05/zulip,hackerkid/zulip,shubhamdhama/zulip,timabbott/zulip,christi3k/zulip,SmartPeople/zulip,dhcrzf/zulip,jphilipsen05/zulip,brainwane/zulip,rht/zulip,showell/zulip,brockwhittaker/zulip,jrowan/zulip,verma-varsha/zulip,hackerkid/zulip,eeshangarg/zulip,j831/zulip,brainwane/zulip,timabbott/zulip,kou/zulip,amanharitsh123/zulip,vaidap/zulip,rht/zulip,amanharitsh123/zulip,brainwane/zulip,jphilipsen05/zulip,ryanbackman/zulip,eeshangarg/zulip,verma-varsha/zulip,punchagan/zulip,christi3k/zulip,eeshangarg/zulip