middleware: Fix logging of query counts in websockets requests.
middleware: Fix logging of query counts in websockets requests.

Apparently, we weren't resetting the query counters inside the
websockets codebase, resulting in broken log results like this:

SOCKET  403   2ms (db: 1ms/2q) /socket/auth [transport=websocket] (unknown via ?)
SOCKET  403   5ms (db: 2ms/3q) /socket/auth [transport=websocket] (unknown via ?)
SOCKET  403   2ms (db: 3ms/4q) /socket/auth [transport=websocket] (unknown via ?)
SOCKET  403   2ms (db: 3ms/5q) /socket/auth [transport=websocket] (unknown via ?)
SOCKET  403   2ms (db: 4ms/6q) /socket/auth [transport=websocket] (unknown via ?)
SOCKET  403   2ms (db: 5ms/7q) /socket/auth [transport=websocket] (unknown via ?)
SOCKET  403   2ms (db: 5ms/8q) /socket/auth [transport=websocket] (unknown via ?)
SOCKET  403   3ms (db: 6ms/9q) /socket/auth [transport=websocket] (unknown via ?)

The correct fix for this is to call reset_queries at the start of each
endpoint within the websockets system.  As it turns out, we're already
calling record_request_start_data there, and in fact should be calling
`reset_queries` in all code paths that use that function (the other
code paths, in zerver/middleware.py, do it manually with
connection.connection.queries = []).

So we can clean up the code in a way that reduces risk for similar
future issues and fix this logging bug with this simple refactor.

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