Implement POSIX mprotect() semantics, and fix fencepost bug in adjacent-mapping merging.