Mask bits properly for pte_prot() in case it is called with additional
VM_PROT_ bits.
Fix a wired memory leak bug in pmap_enter(). If a page wiring change is
made and the page has already been faulted in for read access, and a
write-fault occurs, pmap_enter() was losing track of the wiring count in
the pmap when it tried to optimize the RO->RW case in the page table.
This prevented the page table page from being freed and led to a memory leak.
The case is easily reproducable if you attempt to wire the data/bss crossover
page in a program (typically just declare a global variable in a small program
and mlock() its page, then exit without munlock()ing). 4K is lost each time
the program is run.