fix possible duplicate images from bitmap recycling race condition

There was a case where a cache hit would not increment the result's ref
count in time, which allowed the bitmap to be erroneously reused
(becaused poll() looks for refCount=0 bitmaps).

Bug: 10253182
Change-Id: I64d8f31c42f2847145c22cd27bcfb5a79f84aa44
3 files changed