A 62-year-old man whose dog launched a “horrific” attack on an 11-year-old girl and two men who bravely came to her aid has walked free from court.