lua : make all events synchronous again.

we will have another way to have async works.
lua: re-add the lua lock. it's needed after all...
lua : use a pointer as a unique id for tasks instead of an ID
lua : add lua support for webp

documentation has not been updated yet