D lang compilers have an option -release (or similar) which turns off
asserts, contracts, and other runtime type checking. This patch wires
that up to the b_ndebug flag.
Fixes#7082
It turns out there's a bug in creating a sub dependency out of threads
in that we pass all of the kwargs from the parent to the
ThreadDependency instance. This demonstrates the bug.