The UK has signed a long-awaited deal to hand control of the Chagos Islands to Mauritius, Sir Keir Starmer has confirmed.