When the user cancels the footprint load, we should assume they are
canceling the placement of a new footprint. This also adds sanity check
when populating the list
Fixes: lp:1814181
* https://bugs.launchpad.net/kicad/+bug/1814181
Be more intelligent about sorting lib tree items. (Footprint
entries, for instance, come out of an already-sorted list.)
Don't recreate menus twice when laoding Footprint Editor.
More pervasive use of WX_FILENAME to avoid expensive calls to
wxFileName::SplitPath() and string concatenation.
For POSIX kernels do all the work on the file-system side so we
don't have to keep converting back and forth between encodings.