Commutators on Lipschitz spaces and related function spaces