Minor refactoring to image filters

This pulls the boring parts out of: https://skia-review.googlesource.com/c/skia/+/127338 (Fix srcBounds computation in SkMatrixConvolutionImageFilter)

TBR=bsalomon@google.com
Change-Id: Iade788fcc96c4c16989d13e7592030a6a1d3f170
Reviewed-on: https://skia-review.googlesource.com/127573
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
10 files changed