Major refactoring of the code.

I cleaned up the zip[rw]lua.c code so it's clearer in intent.  And because
of that, I had to update the Lua code written against it.