Possible origin of memory in earthquakes: Real catalogs and an epidemic-type aftershock sequence model