Rewrite mergeKeySets to be O(n) instead of O(n^3)
Merge pull request #864 from spicyj/transition-key-set-faster

Rewrite mergeKeySets to be O(n) instead of O(n^3)