Extract CSP parsing methods out to platform.

We'll likely want to move these somewhere else in the future, but first
things first. I'll worry about what to export where once CSP is less
monolithic.

BUG=346642

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

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