Implement virtual OptimizerRep::getAlgorithm()

Previously, optimizers were required to define getAlgorithm(). However, if a user defines their own optimizer (e.g., CMA), they are unable to modify the OptimizerAlgorithm enum, and thus are not equipped to override getAlgorithm(). Thus, we must provide a definition for this method.