Fix buffer iterator handling of shifted tiles (bug 725604)

Previous code didn't correctly account for buffer shift when
the iterations had different rects.
operations: Fix memory leaks in seamless clone

The leaks detected and fixed herein were discovered using the
"Leaks" template in Apple's "Instruments" tool.
At least according to Instruments, there are completely no leaks anymore
after applying the fixes in this commit.