Refactor TableHeurCalculator to avoid using mutex