Implmented generic function query() on Cmd nodes.  Changed TaskVisitor to generate compact 'if' and 'while' structures when they don't contain 'yield' statements.