Convert an Object to its debugger protocol representation. The representation
may be serilized to a JSON object using JSON.stringify().
This implementation simply runs through all string property names, converts
each property value to a protocol value and adds the property to the result
object. For type "object" the function will be called recursively. Note that
circular structures will cause infinite recursion.
@param {Object} object The object to format as protocol object.
@param {MirrorSerializer} mirror_serializer The serializer to use if any
mirror objects are encountered.
@return {Object} Protocol object value.
function ObjectToProtocolObject_(object, mirror_serializer) {
  var content = {};
  for (var key in object) {
    // Only consider string keys.
    if (typeof key == 'string') {
      // Format the value based on its type.
      var property_value_json = ValueToProtocolValue_(object[key],
                                                      mirror_serializer);
      // Add the property if relevant.
      if (!IS_UNDEFINED(property_value_json)) {
        content[key] = property_value_json;
      }
    }
  }

  return content;
}