Fix for dupes in the calibrationhistory table

A new function to check for dupes in calibrationhistory table
and if found it deletes all but that with the lowest id for
that student_id, location.
Includes an updated unit test that exercises the new function.