Fix transition from hardware to software compositing.

When the the LayerTreeHost's output surface changes, the capabilities of
the renderer change. In particular, support for BGRA textures goes away
when transitioning from hardware compositing to software compositing.

The preferred texture format is cached by tiled layer types and isn't
updated when the renderer's capabilities change, resulting in BGRA
textures being requested for the new renderer that doesn't support them.

Add a callback to all layers on output surface creation so they can
update any cached values that they have.

Also fix a bug where LayerTreeHostImpl::resource_provider_ was assumed
to exist when getting a callback from the GPU memory manager, when in
it may have already been destroyed.

BUG=304384
NOTRY=true

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227824 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 227824