Edinburgh beat Stormers 17-13 in a hard-fought United Rugby Championship match at Hive Stadium. Substitute Rory McHaffie, 19, scored the decisive try on his home debut.