[DL]: Keep a reference to the Document on the DL context.

This patch adds a weak member to the document associated with the locked
element. This accomplishes two things:
1. It simplifies access to the document instead of going through element_.
2. It ensures that if the element_ is destroyed we can still keep the
   locked context counts updated on the document. If the document goes
   away, then we're safe anyway since the counts are destroyed along with
   it.

R=chrishtr@chromium.org

Bug: 882663
Change-Id: Iabbbc185c1b9199aba1f22dccd6837fe6f98a4df
Reviewed-on: https://chromium-review.googlesource.com/c/1456641
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#630931}
2 files changed