If you ever get the sense that the officer is being a prick in leu of having an actual reason or proof of reason to pull you over, just politely say; Thank you, your conduct has been most professional and I would really appreciate having your name and badge number so I may share this experience with your superiors.
If you sound genuine and not cocky, it usually diffuses the situation quickly without further aggravation. oh, and make sure you write a letter of complaint describing the discrimination and unprofessional comments and attitude. CC a copy to all the local and major papers, the media eats this shit up at the moment.