Alexander McCall Smith wins Edinburgh Medal