To check if an autoload was freed, it currently checks for `scene_file_path` by using `Node::is_instance()`, and not if it was actually freed or not. I fixed it by checking if the node is inside the tree, as a freed node cannot be inside the tree anyway.
This sometimes caused crashes when plugins handle their autoloads weirdly (e.g PhantomCamera), which this fixes.
(cherry picked from commit 6848ea595e91cf6a1d5dc4f88c964f8d1f6de178)
The `EditorAutoloadSettings` class does not expect an autoload node to
be freed in between its initial instantiation and any calls to
`update_autoload()`. But this actually *can* happen if the autoload is
an editor script and happens to run something like `queue_free()`
shortly after being initialized.
When this happens, opening the project settings panel results in a
crash, since the editor is trying to locate data such as the node's
script after it has already been deleted.
To fix this, just verify that the node still exists prior to accessing
any of the node's data.
(cherry picked from commit 90d0be8fa34f69bd7cf3a40432a2504234fa5797)
This allows removing it from `class_db.h`, significantly reducing the amount of files
that include it transitively.
Also includes some include cleanup in `control.h` and `rich_text_label.h` done while
ensure they don't depend on `callable_mp`.