The 17-year-old had been released after slashing another boy before fatally stabbing John McNab in Leith