Avoid the hash table StyleInvalidator::clearInvalidation in Node::detach when possible

Accessing the hash table in every ::detach call is a lot of overhead since
in the common case the Element is not even in the hash table. We should
check the needsStyleInvalidation() bit first.

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

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