Fix block_reduce for upsampling factors

Addresses: https://github.com/scikit-image/scikit-image/issues/1296