initrd.scripts: ensure_initramfs_mounts: check if partition is mounted

Before trying to mount a filesystem, check if it's already mounted first.
This way we can call ensure_initramfs_mounts multiple times during
the pivot root initialization.