Refactor regex/signature AcceptingSet data structure and usages.

Several parts of that code would do membership checks and that's going
to be more efficient with a set instead of a list data structure.