Time-of-flight energy analyzer for the plasma potential measurements by a heavy ion beam diagnostic