object: only print stacktraces when debugging enabled
Not sure if this makes sense upstream or not, but I'll post it here for comment anyway. For RHEL, QE was seeing a large number of stack traces in the log and we decided to mute those messages unless G_MESSAGES_DEBUG is set.