Trajectory Optimization on Matrix Lie Groups with Differential Dynamic Programming and Nonlinear Constraints