This is a first implementation of threaded waveform loading. It uses the job system to load waveforms asynchronously but can be further improved by showing the intermediate loaded result while it is being loaded.
The patch includes code that tries to preserve the waveforms between undo steps when possible. It uses data maps which are used elsewhere, see image and movie clip caches. This is pretty much useless currently, because sounds reload completely on loading, something we should avoid with lazy initialization. The code was included to give an idea of how sound data can be preserved. Basically, if sound_load takes a parameter to not delete the waveform in lib_link_sound, this works as intended, but as explained above, the point is to -not- use sound_load for every undo step.