Don't schedule an animation during compositing dirty-bit setting unless needed.

In particular, don't do it if the dirty bits are going to be cleaned up during synchronous
Blink execution anyway. To achieve this, this CL adds an m_updatingLayoutAndStyleForPainting state bit
in PageAnimator to indicate that code is in progress which is guaranteed to call
RenderLayerCompositor::updateCompositingLayers() at its end, and therefore any compositing dirty
bits set before that call do not require a call to scheduleAnimation().

Unfortunately, in a small number of cases RenderLayerCompositor::updateCompositingLayers will set
*new* dirty bits when updating direct compositing reasons. So put in code to check each
RenderLayerCompositor instance in the frame tree for dirty bits after
RenderLayerCompositor::updateCompositingLayers has run and call scheduleAnimation() if so. In the
future we can remove this once the compositing code is fixed to not leave around dirty bits.

BUG=340679

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

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