[STORM-264] Removes references to the deprecated topology.optimize

Unit tests pass.