Incorrect PromptTemplate memorizing

### System Info

LangChain 0.0.187, Python 3.8.16, Linux Mint.

### Who can help?

@hwchase17 @ago

### Information

- [ ] The official example notebooks/scripts
- [X] My own modified scripts

### Related Components

- [X] LLMs/Chat Models
- [ ] Embedding Models
- [X] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [ ] Vector Stores / Retrievers
- [X] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async

### Reproduction

This script demonstrates the issue:


```python
from langchain.chains import ConversationChain
from langchain.llms import FakeListLLM
from langchain.memory import ConversationBufferMemory
from langchain.prompts import (
    ChatPromptTemplate,
    HumanMessagePromptTemplate,
    MessagesPlaceholder,
    SystemMessagePromptTemplate,
)


sys_prompt = SystemMessagePromptTemplate.from_template("You are helpful assistant.")
human_prompt = HumanMessagePromptTemplate.from_template("Hey, {input}")
prompt = ChatPromptTemplate.from_messages(
    [
        sys_prompt,
        MessagesPlaceholder(variable_name="history"),
        human_prompt,
    ]
)

chain = ConversationChain(
    prompt=prompt,
    llm=FakeListLLM(responses=[f"+{x}" for x in range(10)]),
    memory=ConversationBufferMemory(return_messages=True, input_key="input"),
    verbose=True,
)

chain({"input": "hi there!"})
chain({"input": "what's the weather?"})
```

Output:
```
> Entering new ConversationChain chain...
Prompt after formatting:
System: You are helpful assistant.
Human: Hey, hi there!

> Finished chain.


> Entering new ConversationChain chain...
Prompt after formatting:
System: You are helpful assistant.
Human: hi there!    <----- ISSUE
AI: +0
Human: Hey, what's the weather?

> Finished chain.
```

`ISSUE`: `Human` history message in the second request is incorrect. It provides raw input.

### Expected behavior

Expected output:
```
> Entering new ConversationChain chain...
Prompt after formatting:
System: You are helpful assistant.
Human: Hey, hi there!

> Finished chain.


> Entering new ConversationChain chain...
Prompt after formatting:
System: You are helpful assistant.
Human: Hey, hi there!    <----- EXPECTED
AI: +0
Human: Hey, what's the weather?

> Finished chain.
```

History message should contain rendered template string instead of raw input.

As a workaround I add extra "rendering" step before the `ConversationChain`:
```python
from langchain.chains import ConversationChain, SequentialChain, TransformChain
from langchain.llms import FakeListLLM
from langchain.memory import ConversationBufferMemory
from langchain.prompts import (
    ChatPromptTemplate,
    HumanMessagePromptTemplate,
    MessagesPlaceholder,
    PromptTemplate,
    SystemMessagePromptTemplate,
)

# Extra step: pre-render user template.
in_prompt = PromptTemplate.from_template("Hey, {input}")
render_chain = TransformChain(
    input_variables=in_prompt.input_variables,
    output_variables=["text"],
    transform=lambda x: {"text": in_prompt.format(**x)},
)

prompt = ChatPromptTemplate.from_messages(
    [
        SystemMessagePromptTemplate.from_template("You are helpful assistant."),
        MessagesPlaceholder(variable_name="history"),
        HumanMessagePromptTemplate.from_template("{text}"),
    ]
)
chat_chain = ConversationChain(
    prompt=prompt,
    llm=FakeListLLM(responses=(f"+{x}" for x in range(10))),
    memory=ConversationBufferMemory(return_messages=True, input_key="text"),
    input_key="text",
    verbose=True,
)

chain = SequentialChain(chains=[render_chain, chat_chain], input_variables=["input"])

chain({"input": "hi there!"})
chain({"input": "what's the weather?"})
```

Output:
```
> Entering new ConversationChain chain...
Prompt after formatting:
System: You are helpful assistant.
Human: Hey, hi there!

> Finished chain.


> Entering new ConversationChain chain...
Prompt after formatting:
System: You are helpful assistant.
Human: Hey, hi there!     <--- FIXED
AI: +0
Human: Hey, what's the weather?

> Finished chain.
```

I have checked the code and looks like this behavior is by design: Both `Chain.prep_inputs()` and `Chain.prep_outputs()` pass only inputs/outputs to the `memory` so there is no way to store formatted/rendered template.

Not sure if this is a design issue or incorrect `langchain` API usage. Docs say nothing about `PromptTemplate` restrictions, so I assumed it should work out of the box.