Add is_cyclic_permutation and use a real build system.
Update copyrights.