How do I rotate a warping grid without changing the warped image's orientation?
After three and a half days of cursing, a couple of beers with a friend helped solve the problem. My mistake was that the reordering of points needed to be not exactly transpose, but close. So:

To rotate a grid 90 degrees counter-clockwise:


transpose the grid and reflect it along the horizontal central line
apply the transformation 


x = y'

y = -x',

where primes denote old coordinates. 

To rotate a grid 180 degrees


reflect the grid around its horizontal and around it's vertical axis
apply the transformation


x = - x'

y = - y'

To rotate a grid 270 degrees:


transpose the grid and reflect it along the vertical central line
apply the transformation 


x = - y'

y = x'