Renders ast to SQL using a caller-supplied atomRenderer that handles TermNode and PhraseNode leaves. Boolean composition (AND/OR/NOT) and NullNode are emitted as standard SQL.