[tf.data] Fix use-after-free bug when closing down an input pipeline.
This fix affects the distributed runtime; DirectSession use is unaffected.
Before this change, an iterator that used a background prefetching
thread might attempt to use a captured FunctionLibraryRuntime from a
subgraph that had been deregistered (and hence its
FunctionLibraryRuntime would have been deleted). This change
introduces a mechanism for "cloning" the necessary parts of the
FunctionLibraryRuntime so that it can be owned by the
IteratorResource.
PiperOrigin-RevId:
184579490