lua ffi bindings: fix incorrect structs
Some structures have changed but lua was still using the old ABI. I think no our lua code used the fields misplaced due to this, except an example in documentation.
I didn't check much of the ABI in there. I wish I knew some (half-)automatic way how to do that.