qtcollider: envelope view: fix drawing of quadratic and cubic curves

Also, optimize drawing exponential curve.

Fixes #784.