layers: Fix access violation

Move the get_dispatch_key(instance/device) call before calling the
driver's vkDestroyDevice/vkDestroyInstance functions in
unique_objects.  This addresses an access violation error reported
by Application Verifier on Windows due to the previously destroyed
instance/device handle being dereferenced.

Change-Id: I151d42fb8a897d9d3b3c988813108b0b6b5b6b0d
1 file changed