Cristiano Ronaldo and the Manchester United hierarchy have agreed to mutually terminate his contract.