enable assertions in release; fix issues with code not executed in release

Replace all occurances of assert and ASSERT with a custom assertion.
Remove all other includes of assert.h or cassert.
Unreferenced variable warnings in release are gone (I thought it was a
compiler bug, but it was right.)
remove illegal warning disablings