Fix NULL deref when tracing is enabled and malloc fails.

* src/debug.h (TRACE_ERR): Check CTX before a deref.
* src/assuan-defs.h (_assuan_error): Turn into an inline function and
check CTX before a deref.
--

Found by Hans-Christoph Steiner with cppcheck.