Move mmap detection routines to a separate file

Got large enough to deserve its own file...

:: upstream revision 10847 ::