First cut of a LINQ style query class. It uses deferred execution, so does not perform
the query until you iterate over it or convert to vector/map.

It attempts to avoid storing result arrays where possible.
It implements the bare minimum of std::iterator, so it can be used in a for (:) loop
thereby avoiding conversion to a temporary vector.

Only some LINQ functions implemented so far.
Added aggregate, average, min and max functions to the query class.