PDI-12087 - Hang when a sub mapping aborts whilst parent is still running a query

I introduced additional checks on whether a transformation should stop before attempts to write new chunk of data to buffer