One-Shot on-Device Learning for Image Classifiers Using Classification-by-Retrieval