Fixed Issue with positions in ImageStats::update

I had rows and columns mixed up when I was looking at the Python code,
and so update was completely back-asswards. The problem has now been
fixed, but will require some careful dancing moving forward.

Python stores an image row in a column, with different bands in
different columns. The C++ code stores images in rows, with different
bands in distinct rows (that is, in C++, you read right to find more
pixels from the same band, and read down to find the pixel value from
a different band in the same location, whereas in Python, you read
down to find more pixels in the same band, and right for different
bands).

The update() method now takes rows in rows (changed from Python style).
When updating, we need to transpose the matrices from Python, so that
the variable "mads" is the same as in the Python code, but tile is not.