More case creator staging (#3)

- Adding the ability to the basic primitives to save themselves to a
case creator project file.

- Also fixed a bug in GeometricPolygon where for loops accidentally
started at 1 instead of 0 due to a copy/paste error.
Fix some memory and FFMpeg issues
Conditional debug message