Quantitative analysis of rotational dynamics in doped polymers above and below the glass transition temperature: a novel application of second-order nonlinear optics