Factor out OptimizerState::CastRef().  #32881

git-svn-id: https://svn.sourceforge.jp/svnroot/molds/branches/refactor_opt@1640 1136aad2-a195-0410-b898-f5ea1d11b9d8
Factor out Optimizer::InitializeState. #32881

git-svn-id: https://svn.sourceforge.jp/svnroot/molds/branches/refactor_opt@1641 1136aad2-a195-0410-b898-f5ea1d11b9d8
Factor Out OutputOptimizationStepMessage. #32881

git-svn-id: https://svn.sourceforge.jp/svnroot/molds/branches/refactor_opt@1642 1136aad2-a195-0410-b898-f5ea1d11b9d8
Factor Out Optimizer::PrepareState. #32881

git-svn-id: https://svn.sourceforge.jp/svnroot/molds/branches/refactor_opt@1643 1136aad2-a195-0410-b898-f5ea1d11b9d8