“Water-cycle” mechanism for writing and erasing nanostructures at the LaAlO3/SrTiO3 interface