Also, fix debug logging of parse/plan trees so that the messages actually go through elog(), not directly to stdout.