From its medieval castle to charming cobbled streets, the city of 38,000 is the ideal Scottish break this autumn, especially for those who enjoy learning about history and shopping