The Treasury Department will take over the management of student loans whose borrowers are in default, according to a new agreement announced Thursday.