layers: Free per-device and -instance data on destroy

Instance and device data are allocated by the first call to
GetLayerDataPtr in the corresponding vkCreate call. We need to delete
them when we're done with them. Introduce a FreeLayerDataPtr helper
function that assists with this task.

Deletes for dispatch tables were missing in a few places too. Add them.
diff --git a/layers/unique_objects.cpp b/layers/unique_objects.cpp
index 9064d1a..a26085a 100644
--- a/layers/unique_objects.cpp
+++ b/layers/unique_objects.cpp
@@ -172,7 +172,7 @@
     }
 
     layer_debug_report_destroy_instance(instance_data->report_data);
-    layer_data_map.erase(key);
+    FreeLayerDataPtr(key, instance_layer_data_map);
 }
 
 VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice gpu, const VkDeviceCreateInfo *pCreateInfo,
@@ -216,7 +216,8 @@
 
     layer_debug_report_destroy_device(device);
     dev_data->dispatch_table.DestroyDevice(device, pAllocator);
-    layer_data_map.erase(key);
+
+    FreeLayerDataPtr(key, layer_data_map);
 }
 
 static const VkLayerProperties globalLayerProps = {"VK_LAYER_GOOGLE_unique_objects",