python: Hold a reference to plugin instead of dereferencing hook to get to it.

hook might have been free'd by the callback via hexchat.unhook().
Merge pull request #596 from Arnavion/python3-allow-unhook-within-hook

python: Hold a reference to plugin instead of dereferencing hook to get to it.