Optimized sparkline.js

Removed a lot of redundant code. Using linear gradients instead of the
colour of the line segment. Graph is now one continuous stroke with two
circles.