vm_object: add getpages utility
vnode_pager_generic_getpages() and swap_pager_getpages_locked() each
include code to read a few pages behind, and a few pages ahead of, a
specified page range. The same code can serve each function, and that
code is encapsulated in a new vm_object_page function. For the swap
case, this also eliminates some needless linked-list traversal.
Reviewed by: alc, kib
Differential Revision: https://reviews.freebsd.org/D49224