Fix issues in ScriptTriggers' Clean method

* fixes a memory leak
* moves the cleanup into a FrameEndTask to avoid collisions with the
  trigger iterator (fixes #6747)
More Lua API enhancements
Add production support to the new Lua API
Port gdi04a to the new Lua API
Port gdi04b to the new Lua API
Port Intervention to the new Lua API