Add ASSERTs for illegal compositing state queries

This CL add some basic ASSERTs for detecting when we
access compositing state when we shouldn't. Eventually,
these ASSERTs should be based entirely on the
document's lifecycle, but for now we do some RAII magic
to detect when accesses are legal.

BUG=282720

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

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