Merge "Cleanup the shutdown of BatchedScans." into klp-dev