add message stack to async_mock; move logging helper here from
quperl_common.