Learnability and the doubling dimension