Revert "Revert "mm: vmscan: factor out page reference checks""

This reverts commit be1d721947b1211705fa0866621e92667b0ba2cd.