Backport Lua 5.2.2 stack overflow fix. (#7733)

This fixes the issue described in CVE-2014-5461. At this time we cannot
confirm that the original issue has a real impact on Redis, but it is
included as an extra safety measure.