Observation of two-neutrino double electron capture in 124Xe with XENON1T