rotate90 function

Rotate 2D matrix clockwise in 90 degree steps.