thumbnails: Concurrent thumbnailing
Thumbnailing currently processes one thumbnail at a time.
Redesign so that multiple thumbnails can be created at once. Thumbnailing consists of generating and saving. Thumbnail generation is CPU bound, so the maximum concurrent generation amount is the number of logical processors on the system. Decreases execution time when multiple files need to be thumbnailed and the system has multiple logical processors.
Partially inspired by @Yanpas's !660 (closed) (closed). Edited version of !700 (closed) to fix merge conflicts.
Closes #856 (closed), #1397 (closed)