Changed syn.query to return a generator

May require documentation changes due to the different return type of the query method.