asan/tsan: add Printf/Report hook
The hook can be overriden in frontend to print to e.g. a file.