Disable eval_gradient cache()
Replace untested dynamic_cast by static_cast.
Remove dumping of cube-style observation.
Adjust cube optimizer reference to new results.
Introduce GClassCode enumerator and add code() method to identify derived classes without using dynamic_cast constructs.
Make use of code() method to identify derived class type and replace some dynamic_cast statements by static_cast.
Test dynamic_cast replacement by static_cast.