Computing distances and means on manifolds with a metric-constrained Eikonal approach