When parsing component names, we need to account for the possibility of
illegal characters (e.g. "/", ":") in the names from v4 libraries. They
are fixed internally by the cache parser but if we don't fix them
in the rescue routine, the symbol won't match it's cache name.
This standardizes all schematic illegal character routines into LIB_ID
Fixes: lp:1774774
* https://bugs.launchpad.net/kicad/+bug/1774774
The crash happened when during rename operation, when the original part
buffer has been marked as deleted, but its memory was not yet freed. The
renamed part was still using the original SCH_SCREEN object, which was
freed together with the original part buffer.
Three interrelated issues:
1) Implement an undo/redo type for renames so that we know to delete
the old lib entry and add a new lib entry
2) When doing so (for the undo/redo OR the original edit), we must
make a copy of the 'original' LIB_PART which is used for revert, and
hand it to the new lib entry
3) When comparing a modified component tree item with the current item
we must also check for aliases.
Fixes: lp:1743857
* https://bugs.launchpad.net/kicad/+bug/1743857
Fixes: lp:1744371
* https://bugs.launchpad.net/kicad/+bug/1744371
Fixes: lp:1744373
* https://bugs.launchpad.net/kicad/+bug/1744373