Improve performance of ActiveUsersPager query
The query can be very slow, as it has to scan all the recentchanges rows
for all the users in querycachetwo (for activeusers). We can speed that
up at the cost of not filtering out users who were active when
querycachetwo was last updated but aren't anymore.
Also in testing this I found that the query is extremely slow when the
actor table migration stage is in one of the transitional states. This
too can be sped up with some custom logic.