Add Eq instance for Swaps.
Fix Eq instance for Permutation.
Add shapeFromInts utility function.

Useful when debugging.
Fix permute function in IndexFunction.Unsafe.