Control device and control method for injection molding machine