So what's likely happened is he's pulled your bike, ran a check on the plate, ran a check on your name that he got from the plate check, discovered there was nothing current on you or the bike and drove off.
I'm guessing it felt like 30 minutes but was probably nearer to 3 minutes.
If it had been dry he'd have got out and confirmed your id wasting more of your time.
The cop's a cunt, an ignorant cunt for the way he dealt with you, for not telling you what he was doing and for giving you the finger.
In your position I would contact the state police but not as a complaint about a cunt of a cop.
Instead I'd tell them that I think I'd been pulled over by a fake cop, telling them exactly what happened, how you think the guy could be planning something, the way he waited so long, that he seemed to be on some substance from the way he flipped you as he screeched away and that you're concerned for the public. Let the fucker explain his actions to internal investigations.