Enqueue destroy shared image message under lock

Fix a potential bug where last_flush_id_ could be set out of order if
two threads call DestroySharedImage.

R=ericrk@chromium.org
TBR=piman@chromium.org

Bug: 870116, 914976, 882591
Change-Id: I974bff506211cafdc49440306203d6523cf614e5
Reviewed-on: https://chromium-review.googlesource.com/c/1376852
Reviewed-by: Eric Karl <ericrk@chromium.org>
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616512}
1 file changed