The termlist returned from replaceTerms may be identical to the current
DB contents. Avoid blowing up the write transaction by commits which are
actually noops. CPU cycles are cheaper than disk writes and flushes.
Comparing old and new terms is typically cheap (adding or removing files
changes the term list size). File updates often do not change the terms
for all DBs, e.g. a rename changes the ctime and also triggers an update
of the XAttr entry and vice versa. Appending to a file or doing any other
action which changes the mtime triggers a DocumentTermsDB update, while
the set of unique terms may be unchanged.