Optimal control problems for affine connection control systems: characterization of extremals