Fix possible crashes

This fixes issue #29
Merge remote-tracking branch 'upstream/master'
Merge remote-tracking branch 'upstream/master'
Experimental Lua globalstate.

Only using 1 lua_State & lua threads for scripts.
Merge remote-tracking branch 'upstream/master'
Small cleanup + improvement

LuaScriptInterface::getArea & LuaScriptInterface::luaIsInArray improved.
Remove some unneccesary code

It's not neccesary to pop lua values from registered functions.
Small fix
Another fix
Merge pull request #39 from dalkon/master

Use a global lua state and lua threads