Optimized Grayscale Filter performance and footprint.

Changed from "for" to "while" loop and reduced number of variables.

It is possible to get even better performance by assigning the average
amount in a single line, or by dropping the average variable and doing
a direct assignment (See:
http://jsperf.com/fabric-js-grayscale-benchmark/5), however I wasn't
sure if this is against the project's coding guidelines.
Merge pull request #627 from aleph1/master

Optimize Grayscale Filter performance and footprint