refactored permutation algorithms
Merge branch 'master' of https://github.com/fulltilt/JSAlgs