Mac: Fix bugs in Sierra color fix

The previous fix uncondiontally replaced populated the solid color
IOSurface and updated the contents_rect for all layers on Sierra,
instead of just doing it for the ones without IOSurfaces.

Fix this bug, parameterize whether or not we are using this workaround,
and add tests for both code paths.

BUG=633805

Review-Url: https://codereview.chromium.org/2387653004
Cr-Commit-Position: refs/heads/master@{#422281}
4 files changed