From Random Search to Bandit Learning in Metric Measure Spaces