c++: support calling destructor on stack when an assertion is failed

GitHub: fix #10

This change is based on patch by Kazuhiro Yamato. Thanks!!!