operations: some love to gegl:color-reduction

- use GeglRandom instead of a custom random number generator
- use GeglBufferIterator where possible instead of buffer_get/set
- allow the input to be precessed by chunk when possible
- try to avoid code duplication (still not perfect)
- tons of indentation and format fixes (sorry for the diff :/)

the behavior is unchanged (minus the use of GeglRandom)
tests: add a test case for gegl:color-reduction