Stitching: refactor downsampling

Updated the Downsampler API to be more flexible, so that all Stitching
pathways can take advantage of downsampling.
wip: addtilestoroi fixes