rtl_test: Refactoring and optimization for PPM error measurement.

Part 4. Use an enum for ppm_init state.