Corrections for clang 3.2 and lua 5.2

-Detects if the lua version is 5.1 or 5.2 and sets defines accordingly to compile the library
 for the correct version of lua
-The lua code that used setfenv/getfenv is now conditionally executed when version 5.1 is detected.
 I 5.2 is detected the code uses the new _ENV
-Addition of linker flags to always select the static version of LLVM libs, otherwise the compilation fails
-Corrections to reflect subtle changes on clangs api
-Automatic detection of cxxtest, needed for the compilation