Generalized Galileons: All scalar models whose curved background extensions maintain second-order field equations and stress tensors