vkgears: error-check device-extension enumeration code
This cleans things up a bit, avoids a memleak, and adds some missing error-checking.
While we're at it, wrap some long lines that we're touching anyway.
This was inspired by a patch in !178 (closed), but the author isn't responding to reviews.