Improvements to the regex-dna benchmark

This patch improves the parallelization of this benchmark by performing counting and replacing at the same time, which are two completely independent tasks on the same set of data.

Various style changes are included from offline review.