HPCC-10380 Refactor Matchbagofwords

- Refactor matchBagofwords() to make it easier to add new modes of operation
in the future
- Use new code structure to implement StringMatchBagofwords2(),
UnicodeMatchBagofwords2() and UnicodeLocaleMAthcBagofwords2()
- Preserve the existing interfaces StringMatchBagofwords() and
UnicodeLocaleMAthcBagofwords() for compatibility

Signed-off-by: Edin Muharemagic <edin.muharemagic@lexisnexis.com>