[Bug]: Shapes (and maybe other states) are not reset properly when unmounted, so the editor doesn't work well with React.StrictMode
### What happened?

When the render method of `Tldraw` is called twice, for example mounted inside `React.StrictMode` which [calls the render method twice](https://stackoverflow.com/q/61254372),
the `onMount` callback is called twice as expected.
The problem is, the shapes created in the first call is not discarded but still exists in the second call.

This might not be a problem in usual cases, but it's potentially a bug that `StrictMode` is [designed](https://stackoverflow.com/a/61897567) to detect.

```tsx
export default function App() {
	const handleMount = (editor) => {
		// This callback is called twice when this component is used inside React.StrictMode

		// For example, a single new shape is created at one time.
		editor.createShape({
			type: "text",
			x: 100,
			y: 100,
			props: {
				text: "Hello, world!",
			},
		})

		// BUG: However, the shape created in the first call still exists even in the second call,
		// so editor.getCurrentPageShapes().length is 2 in the second call here.
	}

	return (
		<Tldraw onMount={handleMount} />
	)
}
```

### How can we reproduce the bug?

The official examples have this issue.
You can reproduce this problem in the dev mode ([`StrictMode` behaves like that in the dev mode only](https://stackoverflow.com/a/61897567)).

For example, in the "Using custom styles" example (http://localhost:5420/shape-with-custom-styles),
![image](https://github.com/user-attachments/assets/710a9d37-27fe-4c8e-919c-64a51963f53a)
you will find that each shape is created twice as below
![image](https://github.com/user-attachments/assets/10e14073-b4ea-47fc-a651-551b3f7d8c3a)
because the `onMount` below is called twice and the shapes are not reset.
https://github.com/tldraw/tldraw/blob/42070cd6b6ab52bf084cc43b935ac5aa218bcc59/apps/examples/src/examples/shape-with-custom-styles/ShapeWithCustomStylesExample.tsx#L117-L121

When you delete this `StrictMode`,
https://github.com/tldraw/tldraw/blob/42070cd6b6ab52bf084cc43b935ac5aa218bcc59/apps/examples/src/index.tsx#L105
this problem doesn't happen as below where each shape is created only once.
![image](https://github.com/user-attachments/assets/9358321b-27ca-41b5-8742-cfc0da885308)


### What browsers are you seeing the problem on?

Chrome

### Where did this happen?

The developer package

### Contact Details

_No response_

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct