lib: Downgrade BUG* assertions to work-around crashes
BUG() and BUG_ON() didn't use to assert, but only print an error if debugging was enabled. This was hiding a lot of state bugs in drivers, and transforming those into assertions causes crashes.
Downgrade the assertion to only print a warning, and hope that those eventually get fixed in the drivers so we can re-enable them.
Closes: #77 (closed)