Amber Heard and Johnny Depp have agreed a settlement in their defamation dispute, with the actress agreeing to pay her ex-husband $1 million.