A court battle over frozen doughnuts offers a rare glimpse inside the books of Tim Hortons franchises