[keyserver] Clean up fetchMessageInfos using ROW_NUMBER window function
Summary:
From reviewing some StackOverflow answers, I learned that MariaDB 10.8 supports ROW_NUMBER, which wasn't previously supported in MySQL 5.7. We can simplify this query while maintaining the same performance.
Depends on D4674
Test Plan: I first tested this stack locally in my environment to make sure the queries worked. Then I patched it onto my production keyserver and confirmed performance was improved
Reviewers: tomek, atul
Reviewed By: tomek
Subscribers: adrian, abosh
Differential Revision: https://phab.comm.dev/D4675