Generalized spin mapping for quantum-classical dynamics.