fixup lua <-> boost function binding system

The solution in place was working but it was flawed in that unlike
with normal lua callbacks, the callbacks would find the userdata
with a pointer to themselves as the first item on the stack. This
breaks the normal lua stack discipline for callback functions.

This commit makes it work normally, removing the stack entry for
the function before it is called, and also making a local copy
of the function pointer in case the lua garbage collector should
deallocate and destroy it when it is removed from the stack.
fixup ilua _pretty_print function

had some global vs local problems after making this a module loaded
with require rather than a dofile script
Merge branch 'master' of https://github.com/wesnoth/wesnoth