James Dolan's MSG Networks reaches deal to avoid bankruptcy, sets up potential sale to YES New York Post