Proposal of a spintronics-based polarization detector