Fix gen_python to init the hooks in __init__
Fix NeubotPoller_resolve() closure bug

The bug is well explained in the committed comment.

This patch breaks the API (but we don't care because we
have already broken both the API and the ABI).

While there, ensure that we always call the callback.
More work
Add try..catch around slots