lua plugin: Make it possible to register more than one reader/writer.
lua_tostring(), used to identify readers/writers, doesn't work
on functions (it returns NULL). So, callback name is not unique and
its registration fail.
Added code to store script path and callback index in LUA Registry and
to build callback name based on them.
Added possibility to pass LUA callback as global-scope function name.
In this case callback name is built using function name, not callback
index.
Closes: #2379
Closes: #3139