Probing P and CP violations on the cosmological collider