Avoid writing past the end of the gradient color array.
Clean up the Agg gradient fix.
Merge pull request #118 from enthought/fix/agg-gradient-out-of-bounds

Fix some code that was running off the end of an array