Nonlinear wave and Schroedinger equations on compact Lie groups and homogeneous spaces