test_messages: Test number of queries performed by `to_dict_uncached`.
test_messages: Test number of queries performed by `to_dict_uncached`.

`to_dict_uncached` performs queries to db in a loop which should be
replaced with bulk db queries.

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