Creates a interface.ClearableLinker from a function creating a interface.Linker.
Creates a interface.ClearableLinker from a function creating a interface.Linker.
Every time clear() is called, a new interface.Linker is obtained from
the newLinker function to ensure that all the previous state is discarded.
newLinker must returned a new, independent instance of interface.Linker
every time it is called.
If batchMode is true, the returned ClearableLinker clears itself
after every invocation of link.