Segfault on 'Esc' during footprint library load (lp:#1814181)

[Original report](https://bugs.launchpad.net/bugs/1814181) created by **John Beard (john-j-beard)**
```
Linux, master branch, GTK+3

If you press the escape key during library load, you get a segfault.
Generally library loading is too fast to catch for me, but I can slow it
down this way (unsure if that's related):

* Open FP chooser (O)
* This is quite fast (too fast to get a few escapes in)
* Open the browser from the button and place an component
* Open the chooser again (O)
* Now it takes longer (5 seconds, was almost instant)
* Press escape during loading
* Segfault!

#0  0x00007fd54f4646a3 in
LIB_TREE_NODE_LIB_ID::LIB_TREE_NODE_LIB_ID(LIB_TREE_NODE*, LIB_TREE_ITEM*)
    (this=0x55af200b0e40, aParent=0x55af1a2bdad0, aItem=0x0) at
/home/john/src/kicad/common/lib_tree_model.cpp:159
#1  0x00007fd54f465062 in LIB_TREE_NODE_LIB::AddItem(LIB_TREE_ITEM*)
(this=0x55af1a2bdad0, aItem=0x0)
    at /home/john/src/kicad/common/lib_tree_model.cpp:275
#2  0x00007fd54f469fa5 in LIB_TREE_MODEL_ADAPTER::DoAddLibrary(wxString
const&, wxString const&, std::vector<LIB_TREE_ITEM*,
std::allocator<LIB_TREE_ITEM*> > const&, bool)
    (this=0x55af200dd000, aNodeName=..., aDesc=..., aItemList=std::vector
of length 1, capacity 1 = {...}, presorted=true) at
/home/john/src/kicad/common/lib_tree_model_adapter.cpp:116
#3  0x00007fd54ecb5a93 in
PCB_BASE_FRAME::SelectFootprintFromLibTree(LIB_ID, bool) (this=
    0x55af16dc95b0, aPreselect=..., aAllowBrowser=true) at
/home/john/src/kicad/pcbnew/load_select_footprint.cpp:229
#4  0x00007fd54edbe3ca in PCB_EDITOR_CONTROL::PlaceModule(TOOL_EVENT
const&) (this=0x55af17d6bfe0, aEvent=...)
    at /home/john/src/kicad/pcbnew/tools/pcb_editor_control.cpp:480
#5  0x00007fd54edcc55e in std::__invoke_impl<int, int
(PCB_EDITOR_CONTROL::*&)(TOOL_EVENT const&), PCB_EDITOR_CONTROL*&,
TOOL_EVENT const&>(std::__invoke_memfun_deref, int
(PCB_EDITOR_CONTROL::*&)(TOOL_EVENT const&), PCB_EDITOR_CONTROL*&,
TOOL_EVENT const&) (__f=
   @ 0x55af20125de0: (int (PCB_EDITOR_CONTROL::*)(PCB_EDITOR_CONTROL *
const, const TOOL_EVENT &)) 0x7fd54edbded4
<PCB_EDITOR_CONTROL::PlaceModule(TOOL_EVENT const&)>, __t=@0x55af20125df0:
0x55af17d6bfe0, __args#0=...)
    at /usr/include/c++/8.2.1/bits/invoke.h:73
#6  0x00007fd54edcc1da in std::__invoke<int
(PCB_EDITOR_CONTROL::*&)(TOOL_EVENT const&), PCB_EDITOR_CONTROL*&,
TOOL_EVENT const&>(int (PCB_EDITOR_CONTROL::*&)(TOOL_EVENT const&),
PCB_EDITOR_CONTROL*&, TOOL_EVENT const&) (__fn=
   @ 0x55af20125de0: (int (PCB_EDITOR_CONTROL::*)(PCB_EDITOR_CONTROL *
const, const TOOL_EVENT &)) 0x7fd54edbded4
<PCB_EDITOR_CONTROL::PlaceModule(TOOL_EVENT const&)>,
__args#0=@0x55af20125df0: 0x55af17d6bfe0, __args#1=...)
    at /usr/include/c++/8.2.1/bits/invoke.h:95
#7  0x00007fd54edcb842 in std::_Bind<int
(PCB_EDITOR_CONTROL::*(PCB_EDITOR_CONTROL*,
std::_Placeholder<1>))(TOOL_EVENT const&)>::__call<int, TOOL_EVENT const&,
0ul, 1ul>(std::tuple<TOOL_EVENT const&>&&, std::_Index_tuple<0ul, 1ul>)
    (this=0x55af20125de0, __args=...) at
/usr/include/c++/8.2.1/functional:400
#8  0x00007fd54edcad40 in std::_Bind<int
(PCB_EDITOR_CONTROL::*(PCB_EDITOR_CONTROL*,
std::_Placeholder<1>))(TOOL_EVENT const&)>::operator()<TOOL_EVENT const&,
int>(TOOL_EVENT const&) (this=0x55af20125de0, __args#0=...)
    at /usr/include/c++/8.2.1/functional:484
#9  0x00007fd54edca378 in std::_Function_handler<int (TOOL_EVENT const&),
std::_Bind<int (PCB_EDITOR_CONTROL::*(PCB_EDITOR_CONTROL*,
std::_Placeholder<1>))(TOOL_EVENT const&)> >::_M_invoke(std::_Any_data
const&, TOOL_EVENT const&)
    (__functor=..., __args#0=...) at
/usr/include/c++/8.2.1/bits/std_function.h:282
#10 0x00007fd54f4d72ff in std::function<int (TOOL_EVENT
const&)>::operator()(TOOL_EVENT const&) const
    (this=0x55af1cc598e8, __args#0=...) at
/usr/include/c++/8.2.1/bits/std_function.h:687
#11 0x00007fd54f4d4152 in COROUTINE<int, TOOL_EVENT
const&>::callerStub(long) (aData=140722948091040)
    at /home/john/src/kicad/include/tool/coroutine.h:330
#12 0x00007fd54f52edc1 in make_fcontext () at /home/john/src/kicad-
build/pcbnew/_pcbnew.kiface
#13 0x0000000000000000 in  ()

Application: pcbnew
Version: (6.0.0-rc1-dev-1665-g55b5c7189), debug build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.63.0 OpenSSL/1.1.1a zlib/1.2.11 libidn2/2.1.0 libpsl/0.20.2
(+libidn2/2.1.0) libssh2/1.8.0 nghttp2/1.35.1
Platform: Linux 4.20.5-arch1-1-ARCH x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
    Boost: 1.69.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.63.0
    Compiler: GCC 8.2.1 with C++ ABI 1013

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=ON
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON
```
Original tags: pcbnew

Story points: 6.0