mm: vmscan: factor out page reference checks

Signed-off-by: garwedgess <garethwilliams21@gmail.com>