Fixed refiner
This is for the python implementation of the refiner. It actually wasn't broken, I had just tried to use it incorrectly in the first instance. The refiner now works as intended.
I have also added logging of refinement outcomes and data quality metrics.