Add input validation to kis_cubic_curve
Regression fix: pointer distance calculation
Refactoring: Remove cache pixmap from LayerStack

This is a preliminary change towards decoupling view caching from the paint engine,
so that in the future we can implement things like OpenGL based UI rendering.
The immediate benefit is that the cache pixmap is now allocated only when needed.
Minor cleanup
Add minimum OSX version property