Fixed the memory leak.  Refs #7506.

Memory leak is caused by mistakenly using ws.dataX(spectrum), which
causes a copy operatoin on vector, other than ws.readX(spectrum).
As it is not threading safe, the memory leak occurs.
Fixed the inconsistency in unit test.  Refs #7506.