Vulkan: Refactor CommandBuffer helper class.

This makes the base vk::CommandBuffer class as close to the Vulkan
API as possible. It moves the extra functionality and state tracking
to a CommandBufferAndState helper class.

Also no longer stores a reference to a CommandPool in a CommandBuffer.
Eventually we won't need to free CommandBuffers explicitly, since they
can be freed en-masse by deallocating the CommandPool on a flush.

Bug: angleproject:2200
Change-Id: I5095fe89e8da935ff8273b1a402ccfd6a3ffe0df
Reviewed-on: https://chromium-review.googlesource.com/778184
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/renderer/vulkan/FramebufferVk.cpp b/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
index 4b457b7..3585683 100644
--- a/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
+++ b/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
@@ -170,7 +170,7 @@
     const auto &size = attachment->getSize();
     const gl::Rectangle renderArea(0, 0, size.width, size.height);
 
-    vk::CommandBuffer *commandBuffer = nullptr;
+    vk::CommandBufferAndState *commandBuffer = nullptr;
     ANGLE_TRY(contextVk->getStartedCommandBuffer(&commandBuffer));
 
     for (const auto &colorAttachment : mState.getColorAttachments())
@@ -276,7 +276,7 @@
                                            renderTarget->extents, vk::StagingUsage::Read,
                                            &stagingImage));
 
-    vk::CommandBuffer *commandBuffer = nullptr;
+    vk::CommandBufferAndState *commandBuffer = nullptr;
     ANGLE_TRY(contextVk->getStartedCommandBuffer(&commandBuffer));
 
     // End render pass if we're in one.