Measurement of the τ-lepton mass and an upper limit on the mass difference between τ+ and τ−