An Abstract Nash-Moser Theorem and Quasi-Periodic Solutions for NLW and NLS on Compact Lie Groups and Homogeneous Manifolds