loader: Only allow layer in chain once

If an application were to specify a "Validatio" layer
and the environment specified a ParamChecker layer
it was possible to load the same layer twice in
one chain. Layers don't like that can only be referenced
once and that's all they need to support multiple
extensions from the one layer.
This patch adds an alias pointer so that when putting
together the lists of available extensions the loader
can keep track of multiple extensions that are servied
by the same library. Also now create specific
activated_layers_list that contains only the list
of layers that need to be activated.
diff --git a/loader/loader.h b/loader/loader.h
index e2befdc..0e62ec6 100644
--- a/loader/loader.h
+++ b/loader/loader.h
@@ -43,6 +43,7 @@
 #  define LOADER_EXPORT
 #endif
 
+#define MAX_EXTENSION_NAME_SIZE 63
 #define MAX_LAYER_LIBRARIES 64
 #define MAX_GPUS_FOR_LAYER 16
 
@@ -56,6 +57,18 @@
     VkExtensionProperties info;
     const char *lib_name;
     enum extension_origin origin;
+    // An extension library can export the same extension
+    // under different names. Handy to provide a "grouping"
+    // such as Validation. However, the loader requires
+    // that a layer be included only once in a chain.
+    // During layer scanning the loader will check if
+    // the vkGet*ProcAddr is the same as an existing extension
+    // If so, it will link them together via the alias pointer.
+    // At initialization time we'll follow the alias pointer
+    // to the "base" extension and then use that extension
+    // internally to ensure we reject duplicates
+    char get_extension_info_name[MAX_EXTENSION_NAME_SIZE+1];
+    struct loader_extension_property *alias;
     bool hosted;        // does the extension reside in one driver/layer
 };
 
@@ -189,6 +202,7 @@
     struct loader_msg_callback_map_entry *icd_msg_callback_map;
 
     struct loader_extension_list enabled_instance_extensions;
+    struct loader_extension_list activated_layer_list;
 
     uint32_t  app_extension_count;
     VkExtensionProperties *app_extension_props;