Add pickle support for transformations and partial permutations