[server] Always filter message queries by message creation time
Summary:
This solves ENG-812: Improve perf of website load. By limiting the amount of messages that MySQL has to look at in order to resolve fetchMessageInfos, we speed up website load significantly.
On my local environment using the prod database, the query resolves in 0.5s instead of 20s.
Depends On D3348
Test Plan: I downloaded the prod database to my local machine and tested how long the query to load the website took. This change reduced it from 20s to 0.5s
Reviewers: palys-swm, atul
Reviewed By: palys-swm
Subscribers: benschac, Adrian, karol-bisztyga
Differential Revision: https://phabricator.ashoat.com/D3349