operations: merge pixelize and dot

... since they are similar

- fix Bug 710059
- add a "diamond" shape
- don't try to allocate too much memory
- handle edges properly
- the opencl version follows the change