loader: Implement new layer initialization

We now call down the instance and device chains
as part of the creation process. The loader puts
together "LinkInfo" structures that each layer
uses to reference the next layer down in the stack.
These info structures are attached to the CreateInfo
pNext structure. Also have an info structure that
the loader terminator functions (CreateInstance_Bottom
and CreateDevice_Bottom) that includes loader state
they need.
As part of this the CreateDevice function now lives
on the device chain and it has been split into
Top and Bottom functions. Top builds the LinkInfo
structures and Bottom makes the actual call to the ICD
to create the device object.

Change-Id: I5f5a6d579c34942511cce288ba8fa51f9f89f67f
(cherry picked from commit 9091095245975597a0b2031c3b4847f780c1721e)
diff --git a/vulkan/libvulkan/loader.h b/vulkan/libvulkan/loader.h
index 8d5a758..8081c0e 100644
--- a/vulkan/libvulkan/loader.h
+++ b/vulkan/libvulkan/loader.h
@@ -94,6 +94,7 @@
 VKAPI_ATTR PFN_vkVoidFunction GetDeviceProcAddr_Top(VkDevice drv_device, const char* name);
 VKAPI_ATTR void GetDeviceQueue_Top(VkDevice drv_device, uint32_t family, uint32_t index, VkQueue* out_queue);
 VKAPI_ATTR VkResult AllocateCommandBuffers_Top(VkDevice device, const VkCommandBufferAllocateInfo* alloc_info, VkCommandBuffer* cmdbufs);
+VKAPI_ATTR VkResult CreateDevice_Top(VkPhysicalDevice pdev, const VkDeviceCreateInfo* create_info, const VkAllocationCallbacks* allocator, VkDevice* device_out);
 VKAPI_ATTR void DestroyDevice_Top(VkDevice drv_device, const VkAllocationCallbacks* allocator);
 
 VKAPI_ATTR VkResult CreateInstance_Bottom(const VkInstanceCreateInfo* create_info, const VkAllocationCallbacks* allocator, VkInstance* vkinstance);