layers:Refactor RetireWorkOnQueue
layers:Refactor RetireWorkOnQueue

RetireWorkOnQueue() had one check that could cause a validation error.
The check makes sure that an unsignalled event does not precede a query
pool reset in a cmd buffer being retired.

This change splits out the check so that it can be hoisted prior to
calls down the chain, and the actual retirement of work on a queue then
only needs to take place after a call down the chain succeeds.

This initial commit separates these operations for fence retirement
and a follow-on commit will separate remaining operations for queue
retirement.

KhronosGroup/Vulkan-LoaderAndValidationLayers,KhronosGroup/Vulkan-LoaderAndValidationLayers,KhronosGroup/Vulkan-LoaderAndValidationLayers,KhronosGroup/Vulkan-LoaderAndValidationLayers