Undoing a terrain set move could corrupt terrain data where a
terrain from the first set appears duplicated in the second set.
This happens because UndoRedo restores terrain properties without
clearing the existing terrain container first, causing the previous
state to be overlaid on top of the current one.
Fix this by clearing the terrains in the affected terrain
sets before restoring their properties during undo.
This ensures the terrain container is rebuilt from the
saved properties instead of merging with the current state.
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`.