[Container/set] Add new KeyedSet type, to allow for sets of non-hashable...

... elements (like slices)

Refactored out some common code into helper functions to reduce code re-use, and did roughly the same for some of the test suite