Made static variables local variables in TkGluedMeasurementDet

To solve thread-safety issues, converted static variables used for
temporary storage into local variables.