Replaced `loadstring` with `load` under Lua 5.2 when LUA_COMPAT_ALL is not set.
Added using `socket.connect4` when available.

`socket.connect didn't work as expected with the IPV6 changes in luasocket
(the same version of luasocket was used on both connect and listen sides).
Improved reporting of debugger errors to the application.
Improved handling of run-time errors in serialized data (__tostring method).