Fix incorrect indexing in ComplexGrid

Indexing of ComplexGrid is supposed to start from the top-left corner,
as is normal for images and rendering on screen.  The method index()
had the y-axis reversed, putting the origin at the bottom-left.