Don't render empty shapes with non-scaling-stroke

Compute and validate the shape parameters before deciding which code-path
should be used (path vs. primitive). Don't use the fallback when the
bounding box is empty.

Based on WebKit patch:
  https://bugs.webkit.org/attachment.cgi?id=232191&action=prettypatch
by:
  Nikos Andronikos <nikos.andronikos-webkit@cisra.canon.com.au>

BUG=377610

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

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