Now we have 3 versions of this code they really need to be commoned up.

Why the apparent change of heart?  Different circumstances:

For the bug fix for 4.0.x it was safer to clone the code rather than refactor the code used by the runtime engines and potentially break the existing code inside a minor bugfix release.  

However for a change where we have more time we should do it properly and refactor the base class used for csv reading by the engines so it can also be used here, and in the file partitioning code.