Make index flush more safer

Before flush_index() or flush_superblock(), the hole of the old index may be reused by others.
If power off or other crashes, the old index may be destroyed, and the new index is NOT flush to disk, this patch is to prevent this.