CRA-606: Bugfixes in RMS inversion

 + added functionality for finding the enveloping normal distribution in (currently not in use )
 + Removed some warnings from state4D.cpp, wavelet.cpp and wavelet3D.cpp