Lua to OpenDAX Library

I realized that I was starting to duplicate a lot of code when it came to the Lua interfaces in a couple of modules. There were really two places thus far that were duplicated. I had Lua functions defined to add/read/write tags, create compound data types, etc in both the testing module and the DaxLua module. I am sure that these will be needed in other modules in the future as well. I decided to create a separate library for all of the Lua to OpenDAX interfaces. This would serve two purposes. First, it would eliminate all this duplication and second (if done correctly) it would allow for modules to be written in native Lua, using the new library as a Lua module/package.

There was one fundamental difference between functions written for the testing module and the DaxLua module. Since the DaxLua module is multi-threaded the Lua to OpenDAX functions had pthread mutexes to make sure that only one thread at a time could communicate to the server. I decided to add this locking functionality to the OpenDAX library itself. This would make the library thread safe. I've already eliminated all the global data that caused problems with re-entrancy but the library was still not thread safe. I've added these locks in the library and I hope it doesn't cause too much of a performance problem.