C++: Update NDEBUG usage in death tests

--no-rebase

- Fix variantpixelbuffer to run the correct tests
- Fix the conditionals to avoid unused variable warnings (the entire function is inside the conditional, rather than just the individual tests)

--------

Testing: Jobs should remain green.  I've expanded the build matrix to test Debug and Release builds, both of which should be green.  Note that the jenkins job logic might need further work (I've disabled extended tests in Debug mode since they can take a long time to run, but the full set will still run in Release mode; workspaces are also transient to save discspace).