[css-typed-om] Allow StylePropertyMaps to take string arguments.

Currently StylePropertyMaps don't support strings e.g.

  styleMap.set('width', CSS.px(1)) works, but
  styleMap.set('width', '1px') doesn't.

This patch adds string support by moving parsing code to
StyleValueFactory so that both CSSStyleValue.parse and
StylePropertyMaps can share the parsing logic.

We also do some refactoring to make handling both CSSStyleValue
and strings easier.

There are still some code paths that we're not sure is correct,
pending clarification on GitHub:
https://github.com/w3c/css-houdini-drafts/issues/512

Spec: https://drafts.css-houdini.org/css-typed-om-1/#the-stylepropertymap

Bug: 545318
Change-Id: Iaef3cfad69789fc115b7e98a296eec5cb4480cd8
Reviewed-on: https://chromium-review.googlesource.com/769797
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: nainar <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518443}
9 files changed