[sc-memory] Add iterator references system to safe remove of iterated elements