Phase-resolved detection in ion-mobility spectrometry