Update optimizer.h

removed unused m_total_cost variable