Ensure the code compiles with the latest rust nightly version, and fixes some unsafety in MMappedMemory