replace xyzDEBUG with if (DEBUG(xyz))

Also, define `xyzDEBUG` as `if (DEBUG(xyz)) afprintf`.
In the future, `afprintf` should be used for most multi-line debug traces.