Refactor pooling logic into a helper method
Disable pooling when there are cert errors.
Disable pooling when pinning does not match for the new host.
BUG=398925
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=289433
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=290320
Review URL: https://codereview.chromium.org/425803014
Cr-Commit-Position: refs/heads/master@{#290497}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290497 0039d316-1c4b-4281-b951-d872f2087c98