add comments, clean up debugging messages
add comments, clean up debugging messages

The code is now more thoroughly commented, especially the potentially
confusing sections. Debugging messages now call though a common sub
to reduce 3 lines at call site to 1 and improve readability.

Also trying to standardize on Irssi:print vs Irssi::print. I'm not sure
which is more desirable at this point.

Fixed some issues with 'and' not being '&&' hah.

masenf/xmpp-rpc