So rich and prestigious is Edinburgh’s literary output that Unesco named it its inaugural City of Literature in 2004. On the 50th birthday of one of its modern-day stalwarts, Ian Rankin, we take a tour around the city and its writers