Summary:
When returning all entries from QPM the number of entries are counted
and an array of the entries is populated. If there are modifications
to the QPM table between number of entries being calculated and
the array of entries getting populated then the code may access
bad array entries. The fix is to count the entries and populate
the array while the table is locked.
Original commit: 4e1a05870d4c78f1382bd38a254d8cb32f64cb7c / D54859
Test Plan: QPM Workload Stress Test
Reviewers: smishra, kramanathan
Reviewed By: kramanathan
Subscribers: yql
Differential Revision: https://phorge.dev.yugabyte.com/D54938