ffpack and flint code now (mostly?) works with row-major order.

A number of tests have been added to EngineTests too.