Finish annotating zerver/views/messages.py.
Finish annotating zerver/views/messages.py.

These annotations aren't perfect because the sqlalchemy stubs in
typeshed are broken (e.g. a `Select` doesn't have the ability to do
`.where()`, but we've at least used some typevars to make it easy to
address that when the sqlalchemy stubs are less broken).

tommyip/zulip,jackrzhang/zulip,eeshangarg/zulip,TigorC/zulip,sup95/zulip,samatdav/zulip,brockwhittaker/zulip,sonali0901/zulip,rht/zulip,brainwane/zulip,shubhamdhama/zulip,amanharitsh123/zulip,paxapy/zulip,isht3/zulip,kou/zulip,showell/zulip,mahim97/zulip,KingxBanana/zulip,zacps/zulip,Juanvulcano/zulip,sharmaeklavya2/zulip,KingxBanana/zulip,Galexrt/zulip,jainayush975/zulip,reyha/zulip,joyhchen/zulip,SmartPeople/zulip,souravbadami/zulip,PhilSk/zulip,zulip/zulip,susansls/zulip,souravbadami/zulip,vikas-parashar/zulip,umkay/zulip,j831/zulip,JPJPJPOPOP/zulip,amyliu345/zulip,krtkmj/zulip,Diptanshu8/zulip,kou/zulip,amanharitsh123/zulip,brainwane/zulip,andersk/zulip,rht/zulip,j831/zulip,kou/zulip,arpith/zulip,sharmaeklavya2/zulip,grave-w-grave/zulip,brockwhittaker/zulip,punchagan/zulip,ryanbackman/zulip,j831/zulip,vaidap/zulip,zacps/zulip,hackerkid/zulip,verma-varsha/zulip,vabs22/zulip,verma-varsha/zulip,dattatreya303/zulip,christi3k/zulip,isht3/zulip,cosmicAsymmetry/zulip,punchagan/zulip,umkay/zulip,vaidap/zulip,showell/zulip,mahim97/zulip,brockwhittaker/zulip,sonali0901/zulip,AZtheAsian/zulip,arpith/zulip,mohsenSy/zulip,reyha/zulip,dawran6/zulip,krtkmj/zulip,punchagan/zulip,tommyip/zulip,grave-w-grave/zulip,souravbadami/zulip,vaidap/zulip,zacps/zulip,niftynei/zulip,rishig/zulip,susansls/zulip,zulip/zulip,j831/zulip,vabs22/zulip,jainayush975/zulip,rht/zulip,souravbadami/zulip,vikas-parashar/zulip,rht/zulip,jphilipsen05/zulip,paxapy/zulip,Juanvulcano/zulip,isht3/zulip,peguin40/zulip,mahim97/zulip,JPJPJPOPOP/zulip,jainayush975/zulip,KingxBanana/zulip,showell/zulip,brockwhittaker/zulip,cosmicAsymmetry/zulip,christi3k/zulip,krtkmj/zulip,Galexrt/zulip,dawran6/zulip,Diptanshu8/zulip,KingxBanana/zulip,andersk/zulip,JPJPJPOPOP/zulip,isht3/zulip,ryanbackman/zulip,arpith/zulip,timabbott/zulip,jainayush975/zulip,zulip/zulip,jackrzhang/zulip,mohsenSy/zulip,shubhamdhama/zulip,umkay/zulip,TigorC/zulip,rishig/zulip,souravbadami/zulip,susansls/zulip,zulip/zulip,timabbott/zulip,hackerkid/zulip,aakash-cr7/zulip,grave-w-grave/zulip,samatdav/zulip,arpith/zulip,ryanbackman/zulip,amyliu345/zulip,peguin40/zulip,sonali0901/zulip,brainwane/zulip,JPJPJPOPOP/zulip,isht3/zulip,dhcrzf/zulip,umkay/zulip,joyhchen/zulip,jackrzhang/zulip,jphilipsen05/zulip,vabs22/zulip,reyha/zulip,vabs22/zulip,ryanbackman/zulip,andersk/zulip,susansls/zulip,cosmicAsymmetry/zulip,mohsenSy/zulip,kou/zulip,verma-varsha/zulip,Juanvulcano/zulip,andersk/zulip,reyha/zulip,samatdav/zulip,brainwane/zulip,j831/zulip,dhcrzf/zulip,cosmicAsymmetry/zulip,aakash-cr7/zulip,dhcrzf/zulip,joyhchen/zulip,verma-varsha/zulip,eeshangarg/zulip,Galexrt/zulip,aakash-cr7/zulip,vabs22/zulip,Diptanshu8/zulip,blaze225/zulip,umkay/zulip,rht/zulip,TigorC/zulip,sharmaeklavya2/zulip,ryanbackman/zulip,AZtheAsian/zulip,sonali0901/zulip,peguin40/zulip,Diptanshu8/zulip,dattatreya303/zulip,dattatreya303/zulip,PhilSk/zulip,dawran6/zulip,hackerkid/zulip,kou/zulip,jrowan/zulip,sharmaeklavya2/zulip,calvinleenyc/zulip,punchagan/zulip,samatdav/zulip,SmartPeople/zulip,jrowan/zulip,tommyip/zulip,timabbott/zulip,niftynei/zulip,TigorC/zulip,jrowan/zulip,hackerkid/zulip,rht/zulip,hackerkid/zulip,mahim97/zulip,TigorC/zulip,grave-w-grave/zulip,sup95/zulip,amanharitsh123/zulip,eeshangarg/zulip,amyliu345/zulip,mahim97/zulip,kou/zulip,Jianchun1/zulip,rishig/zulip,synicalsyntax/zulip,vaidap/zulip,jackrzhang/zulip,jphilipsen05/zulip,paxapy/zulip,showell/zulip,punchagan/zulip,AZtheAsian/zulip,jainayush975/zulip,krtkmj/zulip,dhcrzf/zulip,hackerkid/zulip,Jianchun1/zulip,eeshangarg/zulip,showell/zulip,samatdav/zulip,tommyip/zulip,sup95/zulip,andersk/zulip,Diptanshu8/zulip,mahim97/zulip,mohsenSy/zulip,blaze225/zulip,calvinleenyc/zulip,andersk/zulip,zacps/zulip,vikas-parashar/zulip,dawran6/zulip,ahmadassaf/zulip,brainwane/zulip,synicalsyntax/zulip,ahmadassaf/zulip,niftynei/zulip,eeshangarg/zulip,tommyip/zulip,kou/zulip,jackrzhang/zulip,christi3k/zulip,PhilSk/zulip,peguin40/zulip,PhilSk/zulip,blaze225/zulip,grave-w-grave/zulip,j831/zulip,vaidap/zulip,sup95/zulip,cosmicAsymmetry/zulip,Juanvulcano/zulip,synicalsyntax/zulip,jphilipsen05/zulip,niftynei/zulip,krtkmj/zulip,jrowan/zulip,blaze225/zulip,zulip/zulip,joyhchen/zulip,verma-varsha/zulip,vikas-parashar/zulip,brainwane/zulip,shubhamdhama/zulip,ryanbackman/zulip,krtkmj/zulip,verma-varsha/zulip,eeshangarg/zulip,shubhamdhama/zulip,joyhchen/zulip,brainwane/zulip,AZtheAsian/zulip,KingxBanana/zulip,dattatreya303/zulip,paxapy/zulip,SmartPeople/zulip,Jianchun1/zulip,amyliu345/zulip,JPJPJPOPOP/zulip,KingxBanana/zulip,jphilipsen05/zulip,AZtheAsian/zulip,mohsenSy/zulip,amyliu345/zulip,shubhamdhama/zulip,peguin40/zulip,vabs22/zulip,niftynei/zulip,eeshangarg/zulip,sup95/zulip,synicalsyntax/zulip,christi3k/zulip,calvinleenyc/zulip,ahmadassaf/zulip,tommyip/zulip,Jianchun1/zulip,rishig/zulip,Galexrt/zulip,mohsenSy/zulip,amyliu345/zulip,shubhamdhama/zulip,amanharitsh123/zulip,sharmaeklavya2/zulip,synicalsyntax/zulip,dhcrzf/zulip,calvinleenyc/zulip,christi3k/zulip,christi3k/zulip,Galexrt/zulip,joyhchen/zulip,souravbadami/zulip,SmartPeople/zulip,paxapy/zulip,showell/zulip,zacps/zulip,blaze225/zulip,aakash-cr7/zulip,AZtheAsian/zulip,dhcrzf/zulip,PhilSk/zulip,dattatreya303/zulip,aakash-cr7/zulip,zulip/zulip,synicalsyntax/zulip,timabbott/zulip,dhcrzf/zulip,ahmadassaf/zulip,jainayush975/zulip,tommyip/zulip,jackrzhang/zulip,andersk/zulip,rht/zulip,grave-w-grave/zulip,Jianchun1/zulip,Galexrt/zulip,krtkmj/zulip,dattatreya303/zulip,cosmicAsymmetry/zulip,brockwhittaker/zulip,Diptanshu8/zulip,Juanvulcano/zulip,susansls/zulip,vikas-parashar/zulip,synicalsyntax/zulip,Jianchun1/zulip,susansls/zulip,jrowan/zulip,SmartPeople/zulip,sonali0901/zulip,dawran6/zulip,aakash-cr7/zulip,PhilSk/zulip,punchagan/zulip,calvinleenyc/zulip,dawran6/zulip,JPJPJPOPOP/zulip,calvinleenyc/zulip,vikas-parashar/zulip,arpith/zulip,brockwhittaker/zulip,shubhamdhama/zulip,sharmaeklavya2/zulip,rishig/zulip,arpith/zulip,niftynei/zulip,isht3/zulip,umkay/zulip,umkay/zulip,ahmadassaf/zulip,punchagan/zulip,ahmadassaf/zulip,hackerkid/zulip,samatdav/zulip,Juanvulcano/zulip,TigorC/zulip,amanharitsh123/zulip,reyha/zulip,reyha/zulip,vaidap/zulip,paxapy/zulip,blaze225/zulip,zulip/zulip,timabbott/zulip,jrowan/zulip,zacps/zulip,amanharitsh123/zulip,peguin40/zulip,timabbott/zulip,SmartPeople/zulip,ahmadassaf/zulip,Galexrt/zulip,showell/zulip,jphilipsen05/zulip,rishig/zulip,sup95/zulip,jackrzhang/zulip,timabbott/zulip,sonali0901/zulip,rishig/zulip