Use sets instead of lists to keep Overload print_maps small.

Thanks to Scott to raising this issue. The use of a functor is so that
I can use the same code for Anthony's use of LVTermNet, but have the
underlying type be a list (this for the sake of backwards
compatibility).