Fix waveform concurrency issues. Possible fix for Bug #1383404

* Use const shared pointers for waveforms.
* Move all std::vector sizing operations to the Waveform constructor. No
  vector state is allowed to change after the constructor finishes.
* Clarify comments.
* Remove waveform mutex usage in WOverview variants.
* Use the track's waveform pointer to atomically swap the waveform
  rather than mutating the waveform in place.
* Remove unused code.
Can you leave here a comment why this is still a vector and not a plain array. 

If I remember correct it is because of the out of bounds checks ... causing the crash we have seen. 
If thats the only reason, we may do the out of bound check in our own code and handle this case gracefully. 
But probably it is not required after your refactoring .. ?