Add UndoStackScriptingInterface and support when editing entities
Update ScriptUndoCommand to run on ScriptEngine thread