Riemannian Optimization and Averaging Symmetric Positive Definite Matrices