Resolve memoryTypeIndex and heapIndex for memory allocation

Fix unitTest_VkHeapTests when test attempts to alloc with
kMemType+1 by checking the memoryTypeCount and memoryHeapCount
supported by the device.

Per vulkan spec vkAllocateMemory:"pAllocateInfo->memoryTypeIndex
must be less than VkPhysicalDeviceMemoryProperties::memoryTypeCount
as returned by vkGetPhysicalDeviceMemoryProperties".
VkMemoryType: "heapIndex describes which memory heap this memory
type corresponds to, and must be less than memoryHeapCount from
the VkPhysicalDeviceMemoryProperties structure".

https://khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html

Bug: b/160937187
Test: Run CtsSkQPTestCases

Change-Id: I18252b9119c64be37eea19f5227f0d5e95e0520d
2 files changed