Replace qengine_assert with assert or other macro, to make more functions work without exceptions
Exceptions reduce efficiency. In many cases, we use qengine_assert to express preconditions, which should be checked at the call-site. Replacing these with asserts mean increased efficiency, although callers should make sure their code is correct.