posix: replace mmap mappings lock with libio lock
Use the libio mutex lock instead of the mmap mappings lock.
Updates #2859.