This code was being generated in both Vulkan-ValidationLayers
and Vulkan-ExtensionLayer. Further uses are on the horizon so
lets stop the copypasta.
Also, add functions to manipulate extension lists and pNext chains,
since many client layers have been doing that themselves.
Generated code must macro-guard platform specific code, but did it in a
naive fashion where consecutive guards for the same platform repeated the
macro. With the help of PlatformGuardHelper, the code generation will elide
redundant macro guards.