Using the new AbstractHaarWavelet and the new DualWeightHaarWavelet in
the haaroptimizer2.cpp and haarcheck2.cpp programs. Also, changed
optimization_commons.h so it takes advantage from the polimorphism
allowed from the AbstractHaarWavelet base class.