log deprecated function calls FS#2399

This introduces a new dbg_deprecated() function which allows for easy
marking of deprecated functions. Each call is logged to the debuglog
when debuggin is enabled.
Merge pull request #693 from splitbrain/logdeprecated

log deprecated function calls FS#2399