Added support for Lua 5.2

I added support to the binary for the Lua 5.2 API, as it changed the way globals are handled (as they're not part of the registry).

I abstracted away the setting and getting of globals, with the functions `lua_getglobal(lua_State*)` and `lua_setglobal(lua_State*)`.  The behavior of these functions mimics `lua_rawget(lua_State*, LUA_GLOBALSINDEX)` and `lua_rawset(lua_State*, LUA_GLOBALSINDEX)` respectively.

I tested the example script, and the output is as expected:

```
kobra@pc:~/Dropbox/Projects/pyrate$ lua -v
Lua 5.2.2  Copyright (C) 1994-2013 Lua.org, PUC-Rio
```
```
kobra@pc:~/Dropbox/Projects/pyrate$ lua example.lua 
Task #1 done
1	33	7
Waiting for thread to finish ...
Task #2 done
Waiting for results ...
Task #3 done
2	66	14
3	99	21
```