fix potential thread-safety issue in contrib/benchmark's TrecDocMaker. (follow-up to http://svn.apache.org/viewvc?view=rev&revision=602475)