Fix #267: pcall inside xpcall is broken

This patch re-implements pcall() function using Lua.