Cleanup ASSERTS for Node::detach.

In r173677 we added ASSERTS for various render tree mutation events. The
ASSERT for the Node::detach() method wasn't fully correct. This CL updates the
document lifecycle to have a specific check if we are able to call
Node::detach() as well as a Scope object to allow us to mark scopes as allowing
detach to be called.

BUG=370463

Review URL: https://codereview.chromium.org/277663002

git-svn-id: svn://svn.chromium.org/blink/trunk@174028 bbb929c8-8fbe-4397-9dbb-9b2b20218538