Tidying up free_factors()

Fixed a few bugs where we passed references to generating sets rather
than copies of them.
Moving relabelling functions to generators.
Generators no longer store any info about relabellers, that's the job of
the factors.