Fix ScriptInterface developer mode settings not applying.

Minor changes:
- clean out some Lua functions registered twice
- Correct bool cast in quad_setSegs()
- Show nested mains in debug console
- One less //HACK comment