Implement [LenientThis] support and enable it in Document.webidl

Closes issue #3760