Fix dashed/dotted regression caused by multi-style text decoration patch.

If you fall through from TextDecorationStyle[Dotted, Dashed] to
TextDecorationStyleDouble, then obviously double lines will be drawn.

Also, change code to reuse as much code as possible rather than duplicate
approximately the same thing three times.

There should be no functional changes other than the regression fix.

BUG=351282
TEST=Covered by existing tests

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

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