Avoid parsing css text if there are identical inline style blocks.

(1) StyleEngine has two hashmaps, one is a mapping from css text to StyleSheetContents and the other is a mapping from StyleSheetContents to css text. When destroying StyleSheetContents, using the above mapping to remove css text.
The hashmaps are only for non-quirks document. Because non-quirks document cannot share styles with quirks document.
 
(2) made StyleSheetContents::checkLoaded to invoke new clients' sheetLoaded. To do so,
  (2-1) moved m_loadCompleted flag from StyleSheetContents to CSSStyleSheet,
  (2-2) added more "protect" to StyleSheetContents::checkLoaded to avoid CSSStyleSheet (i.e. client) and ownerNode being deleted by scripts, and
  (2-3) modified StyleSheetContents::loadCompleted() to see whether all clients completed loading.

(3) LinkStyle::setCSSStyleSheet should use StyleSheetContents' checkLoaded. Because now checkLoaded invokes only new clients' sheetLoaded. We don't need to directly invoke LinkStyle::sheetLoaded (this breaks m_loadCompleted flag and causes assertion failure). 

BUG=308781
TEST=all existing tests covers, so the tests should pass.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@165139 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Revert of Revert of Never send a referrer header if the referrer is not a web url (https://codereview.chromium.org/133863003/)

Reason for revert:
Fixed the browser test meanwhile.

Original issue's description:
> Revert of Never send a referrer header if the referrer is not a web url (https://codereview.chromium.org/136583002/)
> 
> Reason for revert:
> This is the probable cause for the failing browser test CorrectReferrer. See:
> 
> http://build.chromium.org/p/chromium.webkit/builders/Linux%20Tests%20%28dbg%29/builds/1302/steps/browser_tests/logs/CorrectReferrer
> 
> http://build.chromium.org/p/chromium.webkit/builders/Mac10.8%20Tests/builds/5398/steps/browser_tests/logs/CorrectReferrer
> 
> http://build.chromium.org/p/chromium.webkit/builders/Win7%20Tests/builds/543/steps/browser_tests/logs/CorrectReferrer
> 
> Original issue's description:
> > Never send a referrer header if the referrer is not a web url
> > 
> > BUG=none
> > R=abarth@chromium.org
> > 
> > Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=165085
> 
> TBR=abarth@chromium.org,jochen@chromium.org
> NOTREECHECKS=true
> NOTRY=true
> BUG=none
> 
> Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=165090

TBR=abarth@chromium.org,tdanderson@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=none

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

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