cad/kicad: attempt to fix 3D-Viewer by using bundled GLEW
The 3D-Viewer (e.g. from the Footprint Editor) may fail to start
with an "Unknown error" message. Investigation indicates that
kicad really needs it's bundles libGLEW, using the system one
was a mistake.
While here, fix a possible nullpointer dereference in the 3D cache
destructor - this is only relevant when the 3D viewer fails unexpectedly,
but then it is quite annoying during debugging.
PR: 262802
Reported by: Tomasz "CeDeROM" CEDRO