Indices

* Adds a lua preprocessing step which allows using lua functions defined in _lib.lua

* Introduces "Object Types" defined with the OBJTYPE command. a valid objtype must be provided as the first argument to all obj* scripts.

* Adds OBJIDX command to define fields on an objtype which should be indexed.

* Updates all OBJ* scripts to keep indices in sync and emit "idx:*" events