extension: add a debug() function

For reasons I don't pretend to understand, this sometimes just does
nothing.
extension: show "online" for IRC accounts