Make some TreeScope methods public on ShadowRoot instead of friending TreeScopeAdopter

setDocument and setParentTreeScope only make sense on ShadowRoot, not Document, so make
them protected in TreeScope and public in ShadowRoot. This allows the removal of the
friend declaration for TreeScopeAdopter.

Also use references instead of pointers where they make sense.

R=esprehn@chromium.org

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

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