Use 'auto &&' instead of 'const auto &' when we are not modifying the container but are modifying objects it points to.
Don't use virtual inheritance because we don't need it quite yet.
Assume that batchspec_t::all() forces the entire stream to be read.
Fix style issues.
Use a three-state enum instead of two booleans to indicate dirtiness in caching_machinery_t.