Add method to ObjectiveFunction interface to support dynamic objectives better, and write DynamicOffsetObjective decorator.