Edinburgh's handsome hilltop bastion is Scotland's most popular paid tourist attraction, but it also packs some formidable defences.