vulkan: refactor layer enumeration

Replace Enumerate*Layers by a set of new functions that do not distinguish
instance and device layers.  The new functions are also careful not to
pollute the rest of the loader with std containers.

There should be no user-visible change.

Bug: 27911856
Change-Id: I4790fadc1aa2ea934a4628bce55dd45892f15e0b
diff --git a/vulkan/libvulkan/layers_extensions.h b/vulkan/libvulkan/layers_extensions.h
index e2eb32b..ee85f00 100644
--- a/vulkan/libvulkan/layers_extensions.h
+++ b/vulkan/libvulkan/layers_extensions.h
@@ -23,6 +23,7 @@
 namespace api {
 
 struct Layer;
+
 class LayerRef {
    public:
     LayerRef(const Layer* layer, bool is_instance);
@@ -48,8 +49,13 @@
 };
 
 void DiscoverLayers();
-uint32_t EnumerateInstanceLayers(uint32_t count, VkLayerProperties* properties);
-uint32_t EnumerateDeviceLayers(uint32_t count, VkLayerProperties* properties);
+
+uint32_t GetLayerCount();
+const Layer& GetLayer(uint32_t index);
+
+const VkLayerProperties& GetLayerProperties(const Layer& layer);
+bool IsLayerGlobal(const Layer& layer);
+
 void GetInstanceLayerExtensions(const char* name,
                                 const VkExtensionProperties** properties,
                                 uint32_t* count);