cpp: test: Only test multi_array assertions for release builds

Strict bounds checks are only compiled in when NDEBUG is not defined.

/cc @joshmoore 

--------

Testing:

- Run cmake with `-DCMAKE_BUILD_TYPE=Release`
- The pixelbuffer tests should now pass with this change merged
- This won't be tested by our current CI setup; all builds are currently Debug builds