Using an ion-current sensor integrated in the ignition system to detect precursory phenomenon of pre-ignition in gasoline engines