Men’s basketball coach Dan Hurley and the University of Connecticut agreed to a 6-year, $32.1 million contract extension, less than three months after he led the Huskies to a national title, the school said Thursday.