[Bug]: Runtime error with autogen.runtime_logging.start, using nested chats 

### Describe the bug

Enabling runtime logging `autogen.runtime_logging.start`, while using nested chats with the default reply function causes a crash.

Introduced in `v0.2.27` via https://github.com/microsoft/autogen/commit/ebde196d6b893003ef7986dd721d1686e42b9ea8

register_nested_chats -- default reply func uses a partial, which does supply the special `__name__` attribute.

`reply_func = partial(reply_func_from_nested_chats, chat_queue)`

### Steps to reproduce

1. Ensure you're using autogen version `v0.2.27`
2. Run "Additional Information" example, or, enable `autogen.runtime_logging.start(config={"dbname": "logs.db"})` on existing nested chats application which uses the default reply function.

### Model Used

gpt-3.5-turbo


### Expected Behavior

No runtime error, logging executed successfully. 

### Screenshots and logs

```
Traceback (most recent call last):
  File "/Users/rraux/x/logging_failure.py", line 60, in <module>
    res = user_proxy.initiate_chat(
          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/rraux/Library/Caches/pypoetry/virtualenvs/ari-demo-autogen-FkVIsuHz-py3.11/lib/python3.11/site-packages/autogen/agentchat/conversable_agent.py", line 997, in initiate_chat
    msg2send = self.generate_reply(messages=self.chat_messages[recipient], sender=recipient)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/rraux/Library/Caches/pypoetry/virtualenvs/ari-demo-autogen-FkVIsuHz-py3.11/lib/python3.11/site-packages/autogen/agentchat/conversable_agent.py", line 1955, in generate_reply
    reply_func_name=reply_func.__name__,
                    ^^^^^^^^^^^^^^^^^^^
AttributeError: 'functools.partial' object has no attribute '__name__'. Did you mean: '__ne__'?
```

### Additional Information

AutoGen Version: 0.2.27 minimum
Python Version: 3.11.3

Example Code for failure, based on autogen example.

```python
import autogen

config_list = autogen.config_list_from_json(env_or_file="OAI_CONFIG_LIST")
llm_config = {"config_list": config_list}

writer = autogen.AssistantAgent(
    name="Writer",
    llm_config={"config_list": config_list},
    system_message="""
    You are a professional writer, known for your insightful and engaging articles.
    You transform complex concepts into compelling narratives.
    You should imporve the quality of the content based on the feedback from the user.
    """,
)

task = """Write a concise but engaging blogpost about Nvidia."""

user_proxy = autogen.UserProxyAgent(
    name="User",
    human_input_mode="NEVER",
    is_termination_msg=lambda x: x.get("content", "").find("TERMINATE") >= 0,
    code_execution_config={
        "last_n_messages": 1,
        "work_dir": "tasks",
        "use_docker": False,
    },
)

critic = autogen.AssistantAgent(
    name="Critic",
    llm_config={"config_list": config_list},
    system_message="""
    You are a critic, known for your thoroughness and commitment to standards.
    Your task is to scrutinize content for any harmful elements or regulatory violations, ensuring
    all materials align with required guidelines.
    For code
    """,
)


def reflection_message(recipient, messages, sender, config):
    print("Reflecting...", "yellow")
    return f"Reflect and provide critique on the following writing. \n\n {recipient.chat_messages_for_summary(sender)[-1]['content']}"


user_proxy.register_nested_chats(
    [
        {
            "recipient": critic,
            "message": reflection_message,
            "summary_method": "last_msg",
            "max_turns": 1,
        }
    ],
    trigger=writer,  # condition=my_condition,
)

logging_session_id = autogen.runtime_logging.start(config={"dbname": "logs.db"})
res = user_proxy.initiate_chat(
    recipient=writer, message=task, max_turns=2, summary_method="last_msg"
)
autogen.runtime_logging.stop()
```

Labels: logging
State: closed