posix: Use function instead of macros
posix: Fix mutex auto initialization

Use the once lock to prevent race conditions during auto initialization.
posix: Add auto initializaton for rwlock
IMFS: Avoid NULL pointer access

Avoid NULL pointer access in IMFS_is_imfs_instance().  File systems
mounted via mount() always have a valid type string.