lua : fix bug #9682 in the single cpu case

some functions take the gdk lock implicitely.
we need to release the lua lock before calling them