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().

TingPing was unable to reliably repro the crash, but I could. Verified what was happening by debugging.