Generalise change-query iteration

I'm betting that I'm going to want to iterate over all kinds of
different change queries, let's make that more convenient.