Refactoring wmean_1D to use wmean_1D_serial.

wmean_1D is the parallel version. Now it uses more the wmean_1D_serial,
and doing so I hope to help to keep consistency between wmean_1D_serial
and wmean_1D.