refer to master pullrequest #386 and #383, related commits are (all in master(kpv) tree): cb25029dddc42693cc7aaefbe47e9bd3b7e1a750 c7b4cf71f808a40d2461bac4e02bf8d2d4127327 379cba7b68cac6b00cc0ef74a7de6f18a174d838
the replacement of debug() was necessary to be able to access the lua library "debug" (for backtraces etc.)
all lua frontend files are now in the frontend/ directory. all old code is cleaned up.