function __emptyObject(obj) {
    var k;

    for (k in obj)
      if (!('hasOwnProperty' in obj) || obj.hasOwnProperty(k))
        delete obj[k];

    return obj;
  }
This custom tool function removes every pair key/value from an hash. The
goal is to avoid creating a new object while some other references are
still hanging in some scopes...

@param  {object} obj The object to empty.
@return {object}     The empty object.