fixed bugs with thread functions calling thread-unsave functions
This change fixes potential problems with static values returned by
functions that are not thread-safe (filenames of score cache files
and score tape filenames, which change with each invocation of these
functions). Additionally, more problems can (and likely will) happen
with using global variables (score data of last added score entry),
which are changed in the main process while the thread function is
using them.
To fix this, all relevant data is copied to a structure which is then
exclusively used by the corresponding thread function.