Single-defect Memristor in MoS$_2$ Atomic-layer