Andrew Marr explains how Edinburgh changed from a squalid provincial city into a beacon of intellectual thought.