Buffer fix for VkProgram caching

When caching VkPrograms, we can end up with situations where we
overwrite uniform buffers while they're in use (or being prepared for
use) in the command buffer. This fix will address that. This also
addresses the rare but similar case of overwriting vertex or index
buffers when they're in flight.

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1774963003

Review URL: https://codereview.chromium.org/1774963003
3 files changed