Moved some code in CasePanel that calculated permutations (for automatic
CaseRule generation) to Permutations.