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
Fix stack overflow when formatting ColorMask

The old implementation of ColorMask relied on itself for formatting,
leading to an infinite recursive loop and eventual stack overflow.

Thanks to @bjz for suggesting this approach.