Allow style sharing across shadow trees

Improves perf on LayoutTests/fast/selectors/style-sharing-shadow-expected.txt by 12-15%. 

   1. In Element::supportsStyleSharing(), allow style sharing if
       the element has a parent element or a shadow host element,
         and allow style sharing for elements with shadows.
    
    2. Add
    SharedStyleFinder::sharingCandidateShadowHasSharedStyleSheetContents()
       which checks if two element's shadows have shared style sheets.
    
    3. In SharedStyleFinder::canShareStyleWithElement(), modify
       checks on parent element to check the parent or shadow host
         element. If the element has a shadow, check if the shadows
         have shared style sheets.

BUG=314299

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

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