Crash on invalid usage
We aren't required to check these things, but since these are low frequency calls and we're permitted to check them, I think we should. Turns out, both of these crashes in the validation layer also happen in Monado without the validation layer, since we're also not checking the conditions.
- https://github.com/KhronosGroup/OpenXR-SDK-Source/issues/160 (passing capacity > 0 but a null pointer to xrEnumerateSwapchainImages)
- https://github.com/KhronosGroup/OpenXR-SDK-Source/issues/161 (passing count > 0 but a null pointer to the action sets in the XrActionsSyncInfo as a parameter to xrSyncActions.)
There are presumably more of these: in the validation layer case, these were two specific kinds of generated code that were missing checks or had wrong checks. Since there isn't a generated code frontend in Monado, these are all going to be hand-coded and I'm sure we missed some. Static analysis found these in the validation layer.