tests: Add information about assertion failures

This commit makes any test fail if any assertion in the C++ code fails.
Information about the failed assertion (file, line, name of a function)
is added to test's output. This is achieved by using the DEBUG_LOG
mechanism, which was modified not to depend on cfg_* functions, so that
we can safely use DEBUG_LOG() in all the code (eg. in massert.h). Some
changes were also made to make the error information more readable.

Change-Id: Ie68feece360de2b3dbf41000e673e24207826395