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.

I leave it to the developers to decide whether permutedims! (and then also transpose! for consistency) will be exported or not.