Fix a long-standing pmap bug, where we would enter an executable mapping
for a page before synchronizing the data and instruction cache. This means
that another thread that is executing code on this page may not fault, but
see stale contennts until the data cache flushes and/or instruction cache
invalidation propagates. The bug surfaced when testing a change that would
recycle code pages quickly instead of keeping them around.
Fix the issue by synchronizing the caches before entering an executable
mapping for a page. Also make sure we mark the page as "clean" after
synchronization instead of before.
ok patrick@, jca@ (and mpi@ and dlg@ for an earlier version of this diff)