added permutedims!

Separated the permutedims method into a permutedims! method which
stores the permutation a given array into a specified destination, and
the wrapper permutedims which reproduces the original functionality by
creating the required destination storage and then calling permutedims!
on it.