Mel B averts trial by settling with estranged husband and ex-nanny