Adjust painting disabled mode behavior and fix crash on Windows

The purpose of the painting disabled mode is to make it possible to
measure the performance characteristics of blink's painting logic while
excluding the work done in GraphicsContext and, by extension, Skia. This
means that when painting is disabled, blink should still execute its
painting operations as normally as possible.

For the most part this happens automatically, but one exception is when
blink reaches into the GraphicsContext to use its underlying SkCanvas
directly. When painting is disabled, this canvas doesn't exist and hence
should not be used.

This patch adjusts blink's behavior in painting disabled mode in three
ways:

1. Make it an error to call GraphicsContext::canvas() when painting is
   disabled. This makes it less likely for blink to pass around a null
   canvas and trigger a crash somewhere else in specialized painting
   code.

2. Remove blanket checks for GraphicsContext::paintingDisabled() in
   favor of checking right before using the GraphicsContext's canvas
   directly. This ensures more of the normal painting code is run even
   if painting is disabled.

3. Add checks for GraphicsContext::paintingDisabled() where they were
   missing -- most notably in ScrollbarTheme::paintScrollCorner which
   caused the linked bug.

BUG=360666
TEST=On Windows with at most 800x600 screen resolution:
     $ python tools/perf/run_benchmark rasterize_and_record_micro.top_25 --browser=release

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

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