A U.S. judge confirmed the Detroit plan to adjust its debt and exit the biggest-ever municipal bankruptcy on Friday.