This one was a doozy, attached is a patch to convert it to the new tokenstream API.
Some of the logic was split into WordDelimiterIterator (exposes a BreakIterator-like api for iterating subwords)
the filter is much more efficient now, no cloning.
before applying the patch, copy the existing WordDelimiterFilter to OriginalWordDelimiterFilter
the patch includes a testcase (TestWordDelimiterBWComp) which generates random strings from various subword combinations.
For each random string, it compares output against the existing WordDelimiterFilter for all 512 combinations of boolean parameters.