layers: Factor out marking of first use as read or write...
layers: Factor out marking of first use as read or write...

.. and make the handling of VK_ATTACHMENT_UNUSED consistent across all
cases. Previously we could end up with useless tracking of
VK_ATTACHMENT_UNUSED.

Signed-off-by: Chris Forbes <c3279c50043e18e9442c1ae071cafa0e7a4ca967@google.com>

KhronosGroup/Vulkan-Tools,KhronosGroup/Vulkan-Tools,KhronosGroup/Vulkan-Tools,KhronosGroup/Vulkan-Tools