lua : make the core-visible lua state a structure

this will allow me to have more lua private data in there later
lua : move the mutex into the new lua structure
add a function to check if we have the gdk lock
lua : run all lua code in secondary threa

lua cannot block the UI thread anymore

note that lua code can still
* starve DT out of working threads
* prevent other LUA threads from working