Here's a patch that allows plugins to use geany_debug, for your consideration.  I'm not real happy about the way things have to be named to conform to the existing conventions (requiring a new struct named GeanyFuncs, which might be easily confused with struct GeanyFunctions in plugins.c and plugindata.h), so feel free to muck with this if there is a better way.

- tony