Optimization Algorithms on Homogeneous Spaces