Update the batch queue changes.
This mainly consists of refactoring the page queue scan code to
reduce code duplication and diffs with HEAD. In addition,
enqueues at the head of the inactive queue are now batched, and
active queue scans are performed without requeuing.