CM Stability and the Generalized Futaki Invariant I