Reland "[DL]: Ensure to reject update/commit promises on disconnected elements."

This reverts commit a36e6e1d9422377bb173d2c1139e66276933c51c, which reverted
the initial patch.

The original patch description is:
"""
    This patch ensures that we reject update/commit when it happens on
    a disconnected element.

"""

The changes in this CL include:
- Ensuring that we can commit a disconnected element, since it just
  unlocks the lock
- Ensuring that a timeout triggered on a disconnected element does not DCHECK
  (this was the cause of the revert to begin with)
- Updates the test to have an explicit infinite timeout if timeout is not being
  tested, since bots can be slow and timeout the lock thus making tests flaky.
- Adds a test for timeout on disconnected element.

R=chrishtr@chromium.org

Bug: 917584, 882663
Change-Id: I6a417fde2c6bd113959128c8bb33a865c97cac8b
Reviewed-on: https://chromium-review.googlesource.com/c/1393346
Commit-Queue: vmpstr <vmpstr@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619490}
20 files changed