replace int by size_t when referencing buffer size in a few places

darktable has various issues when working with huge image sizes. one of the problems
is fixed now but others still remain.
Merge branch 'master' of ssh://github.com/darktable-org/darktable