Refactor ‘_get_candidate_file_descriptor_ranges’ to use ‘range’ objects.
This avoids the requirement for a concrete set of all the actual file
descriptors. When the range is very large, this can greatly improve the memory
requirements and execution time of this function.