rustc: Restrict the scope of a borrow on def_map

This addresses the ICE from #13763, but it does not allow the test to compile,
due to #13768. An alternate test was checked in in the meantime.

Closes #13763
Add debug_assert and debug_assert_eq macros

I also switched some `assert!` calls over to `debug_assert!`.

Closes #12049.

RFC: 0015-assert
Remove useless assert! case