Add new APIs for configurable "panic" support.

This patch adds hooks for abort stop situations (I call it "panic" as Lua calls so).
The function is similar to Lua's. And there have some extensions.

* "Global hook" and "State local hook". Lua has global hook only.
* Adds simple guard. Can't overwrite. Can't reset if he don't know current hook C function.

I tested by df8d7d479fc20ae1524e9b2f9fc2dbcb72bbae7b. It may a simple usage.
I didn't add this test as test suite has not merged yet.