Metric structure of cut loci in surfaces and Ambrose's problem