Application and modeling of an online distillation method to reduce krypton and argon in XENON1T