fix coqdoc bug with duplicate entries in index

This is backported from the subsequent fix in
     r15895 - branches/v8.4/tools/coqdoc
reported at
     http://lists.gforge.inria.fr/pipermail/coq-commits/2012-October/010802.html
as suggested by Benedikt Ahrens.