querySelector() should not match deep in the multiple shadows.

querySelector() used to match deep in the shadow trees, exposed by a test:
http://jsfiddle.net/UwFP2/1/
which is different result from when the same selector is specified in CSS.

This CL fixes it by checking if the last matched element lives in the same
TreeScope as its scoping host of querySelector().

BUG=390301
TEST=pass all existing layout tests, pass the updated layout test.

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

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