Fix crash when adding text to a newly created SimpleText element.

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.