Search for inelastic scattering of WIMP dark matter in XENON1T