Check for errors after every draw command
Print more useful information on errors

The "if cfg!(not(ndebug))" mirrors the implementation of
debug_assert_eq!, so it shouldn't be any more expensive than the macro
itself.
Merge pull request #373 from hannobraun/error-checking

Improve error checking