Lua-Support: Added output redirection.

- Implemented facilities for running scripts.
- Added maps and menu entries to set the output redirection.
- Minor changes.
- Reworked the template library.
- Improved a codesnippet.
- Documentation.