vulkan: rework CreateInstance_Bottom and related ones

The reworked driver::CreateInstance will

 - call HAL's EnumerateInstanceExtensionProperties and filter out
   extensions unknown to HAL, if there is any extension enabled.

We do not expect or enumerate any HAL layer yet as that requires some
works to layers_extensions.cpp.

The reworked driver::EnumerateInstanceExtensionProperties instead will
return all extensions enumerated by HAL, after prepending VK_KHR_surface
and VK_KHR_android_surface to them.  This allows extensions unknown to the
loader to be enumerated.

Change-Id: I73b496582a773e06c7b79f0c5c166700737f2953
diff --git a/vulkan/libvulkan/code-generator.tmpl b/vulkan/libvulkan/code-generator.tmpl
index e06ce12..d5995a5 100644
--- a/vulkan/libvulkan/code-generator.tmpl
+++ b/vulkan/libvulkan/code-generator.tmpl
@@ -601,6 +601,7 @@
     {{/* Create functions of dispatchable objects */}}
     {{     if eq $.Name "vkCreateInstance"}}true
     {{else if eq $.Name "vkCreateDevice"}}true
+    {{else if eq $.Name "vkEnumeratePhysicalDevices"}}true
     {{else if eq $.Name "vkGetDeviceQueue"}}true
     {{else if eq $.Name "vkAllocateCommandBuffers"}}true
 
@@ -612,9 +613,6 @@
     {{else if eq $.Name "vkEnumerateInstanceExtensionProperties"}}true
     {{else if eq $.Name "vkEnumerateDeviceExtensionProperties"}}true
 
-    {{/* We cache physical devices in loader.cpp */}}
-    {{else if eq $.Name "vkEnumeratePhysicalDevices"}}true
-
     {{else if eq $.Name "vkGetInstanceProcAddr"}}true
     {{else if eq $.Name "vkGetDeviceProcAddr"}}true
 
@@ -749,11 +747,7 @@
     "{{$.Name}}",
     ProcHook::GLOBAL,
     ProcHook::EXTENSION_CORE,
-    {{if eq $.Name "vkEnumerateInstanceExtensionProperties"}}
-      reinterpret_cast<PFN_vkVoidFunction>({{$base}}),
-    {{else}}
-      reinterpret_cast<PFN_vkVoidFunction>({{$base}}_Bottom),
-    {{end}}
+    reinterpret_cast<PFN_vkVoidFunction>({{$base}}),
     nullptr,
     nullptr,
   },
@@ -789,14 +783,7 @@
       {{end}}
     {{else}}
       ProcHook::EXTENSION_CORE,
-
-      {{if eq $.Name "vkDestroyInstance"}}
-        reinterpret_cast<PFN_vkVoidFunction>({{$base}}_Bottom),
-      {{else if eq $.Name "vkEnumeratePhysicalDevices"}}
-        reinterpret_cast<PFN_vkVoidFunction>({{$base}}_Bottom),
-      {{else}}
-        reinterpret_cast<PFN_vkVoidFunction>({{$base}}),
-      {{end}}
+      reinterpret_cast<PFN_vkVoidFunction>({{$base}}),
       nullptr,
       nullptr,
     {{end}}