makeTempNameGenerator: Produce a temp name generator with a given prefix.
Description
Returns a function f where: f() returns a new temporary name,
f(remove=vector) removes names in vector and returns what was removed,
f(dumpList=TRUE) returns the list of names generated and clears the list,
f(peek=TRUE) returns the list without altering anything.