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/parameter_validation.cpp b/layers/parameter_validation.cpp
index 4359b49..87c40ba 100644
--- a/layers/parameter_validation.cpp
+++ b/layers/parameter_validation.cpp
@@ -318,8 +318,9 @@
         }
 
         layer_debug_report_destroy_instance(my_data->report_data);
-        instance_layer_data_map.erase(key);
     }
+
+    FreeLayerDataPtr(key, instance_layer_data_map);
 }
 
 VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDevices(VkInstance instance, uint32_t *pPhysicalDeviceCount,
@@ -626,8 +627,9 @@
 #endif
 
         my_data->dispatch_table.DestroyDevice(device, pAllocator);
-        layer_data_map.erase(key);
     }
+
+    FreeLayerDataPtr(key, layer_data_map);
 }
 
 static bool PreGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex) {