kernel - Fix races created by a comedy of circumstances
* Fix several loop iteration races in the pmap code revealed by a chain
of events. Initially the commit to relax locking of vm_map for
MADV_INVAL operations (used by the vkernel) worked just fine. The
idea being that the pmap code was fine-grained locked and so a wider
encompassing lock should not have been needed.
However, a later commit to reduce the size of the zalloc pcpu caches
caused more cycling of pv_entry structures across cpus which revealed
a number of SMP races in the pmap code.
* A number of these races were fixed in recent commits and this commit
fixes a few more, primarily in the vm_page_t pv_entry loop iterators.