Racetracks and Extermal Problems for Curves of Bounded Curvature in Metric Spaces