Don't write to /tmp/refs when REF_DEBUG is not defined.

If MALLOC_DEBUG is enabled, then the debug destructor for the container
is used, which would erroneously write to /tmp/refs. This patch only
uses the debug destructor if ref_debug is used.

(closes issue ASTERISK-22536)


git-svn-id: http://svn.asterisk.org/svn/asterisk/branches/1.8@399098 f38db490-d61c-443f-a65b-d21fe96a405b