Matrix rotation by 90 degrees using O(1) extra space.