Mel B has avoided a potentially-embarrassing court trial by agreeing to pay her former nanny £1.8 million in damages.