Improve internal data structure

This pull request simply tracks the `rewrite` branch/milestone, which consists of the following tasks:

- [x] rewrite data structure to decrease memory usage and allow faster set operations
- [x] remove `.remove(fn)` as it won’t be needed anymore (it was only there to provide better performance, which will soon be available at all times anyway)
- [x] rewrite `createCharacterClasses` to make use of the new data structure
- [x] rewrite `difference` to make use of the new data structure
- [x] rewrite `intersection` to make use of the new data structure
- [x] deprecate non-chaining APIs?