BUG: avoid hangs/crashes when importing - fixes #2839, #2871

See CTK bug #292
https://github.com/commontk/CTK/issues/292

Multithreading of the indexing operation removed.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21609 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Avoid build error on windows by shortening filename of generated pythonqt files

This commit is a follow-up on r21605 and applies on Slicer base libraries
instead of slicer module libraries.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21610 3bd1e089-480b-0410-8dfb-8563597acbee