Fix CDB file generation

- readWikiVersionsFile returns an associative array, not an array of arrays.
- readWikiVersionsFile should sort keys to make repeated runs on the same input
  deterministic.

Change-Id: Ic27cb9581a99cf18fc703b0d3d60e95a7bbc08a2