Fix #24409 : crash when creating a new SimpleText element or adidgin text to an empty one

When some text is typed for a newly created `SimpleText` text item (staff, system, ...), the program crashes.

- Added a test to check the `SimpleText::_text` list is not empty before adding to it.
- Added another test to check `TLine::_text` list is not empty before taking its y coord.