Rotate a 2D matrix by 90 degrees clockwise