change unit-testing framework from nodeunit to mocha + chai, fixes #2

and fix some tests
fix logging and stacktrace update on message update