Logged errors should always set tdb->ecode before they are called, and
there's little reason to have a sprintf-style logging function since
we can do the formatting internally.
Change the tdb_log attribute to just take a "const char *", and create
a new tdb_logerr() helper which sets ecode and calls it. As a bonus,
mark it COLD so the compiler can optimize appropriately knowing that
it's unlikely to be invoked.