Simultaneously ultrafast and robust two-dimensional flash memory devices based on phase-engineered edge contacts