Subtractive renormalization of the NN interaction in chiral effective theory up to next-to-next-to-leading order: S waves