Fix Lua plugins to work with multiple threads

Unlock the LGI lock after init and acquire and release it
as necessary. This allows plugins to be used from multiple
threads and global plugin loader limitations.

https://bugzilla.gnome.org/show_bug.cgi?id=741579
Test that plugins are multi-thread safe

https://bugzilla.gnome.org/show_bug.cgi?id=741579