MAINT: Move batch transform into a dedicated module.

Break the BatchTransform class and decorator function into a
separate module, with hope that it makes it easier to zero in on
batch transform logic.