treesearch: improve CSV generation

- use Excel dialect of CSV: no superfluous spaces, quote only when
  needed.
- don't assume dact corpora have numerical keys, fetch nth sentence
  instead of 'n.xml'.