Reduce the genericity of the set package

This PR may be more contentious than the first although there is indication in the docs in master that suggest that this change has been considered. I think that there is reasonable argument for the changes here given that they were responsible for finding bugs in my previous set of changes.

I have left DisjointSet alone, but there is room for it to also be made more specific and then moved into search as an unexported type. Comments on this are welcomed.