util: Enable list_assert and simple_mtx_assert_locked in debugoptimized builds
In debugoptimized builds, DEBUG is not set (and neither is NDEBUG). The intention of NDEBUG is to disable assertions. As such, list and mutex assertions should be gated on !NDEBUG as opposed to on DEBUG.
This would have caught an assertion failure (due to the wrong iterator used) sooner for the Valhall compiler. (Bug caught by @icecream95 )
Cc @dbaker @eric @anholt as the usual tools trio.
There's a strong case for deleting the DEBUG macro altogether and handling as NDEBUG. A debugoptimized build is expected to be optimized for debug
And if it's just a few cases where the debug noise is expensive, that should maybe be dealt with separately.
I rather expect this to trip over bugs in other drivers...