Calling arbitrary code on function definition

Allows us to insert any dynamically generated code at the beginning of
function definition. In some applications this significantly reduces
boilerplate code. See "boilerplate.sh" and its tests for details. Note
that support for custom call stack was kept.