First version of permutation
Fix applyTo():

    use iterator_traits to get underlying type
    pass collection as non-const reference
Fix permutation size in pow
Rewrite exception messages
Merge branch 'permutation' into develop