Rotates an image represented by M by 90 degrees
counterclockwise. We assume that each pixel is
4 bytes (an int) in size.