[RenderEngine] relax locking conditions of image cache.

RenderEngine::drawLayers is currently only called on the main thread,
and layers should not be destroyed while the main thread is running, so
we don't need to lock during the entirety of rendering.

Note that with this change there is still some jank because GPU
rendering does take a long time, but it's not nearly as bad as before.

Bug: 136806342
Test: open photos a bunch of times
Change-Id: I66d52c07f31ccf350dec4df665364868350e13c0
3 files changed