Previously all the dictionary cleanup logic was in the function:
fn generate<W: std::io::Write>(file: &mut W, dict: &[u8])
which parsed the provided buffer as CSV and also took care of writing
the processed dictionary back as CSV. This commit factors out the CSV
handling, leaving a `process` function behind so that it can be easily
tested in the following commit.