CSV/JSON export: work with new query interfaces

NB: I do not like the fact that we have to do as follows:

  DataView->getQuery()->fetchWhatever();

Guess this is worth a few more proxy functions.