Auto-detect modules in Lua scripts


git-svn-id: http://www.latex-project.org/svnroot/experimental/trunk@4777 de43f980-851b-0410-b2f7-c40aca1f87e0
Errorlevel return for checks was defective (Lua scripts)

Lua's "foo = foo or bar" is a true/false based on existence, not 1/0, so the
older approach does the wrong thing. A slightly more convoluted route fixes
that.

There are also a couple of minor refactors.


git-svn-id: http://www.latex-project.org/svnroot/experimental/trunk@4778 de43f980-851b-0410-b2f7-c40aca1f87e0
Use ipairs for all Lua table iterations

All of the tables are 'well-ordered', so it is probably clearer to iterate
in a predictable order.


git-svn-id: http://www.latex-project.org/svnroot/experimental/trunk@4779 de43f980-851b-0410-b2f7-c40aca1f87e0