Implement close() for the scan iterator