duplicate key value JDBC exception when indexing large Mercurial repo

fixes #683

I tested with complete index:

```
svcadm disable -t javadb
rm -rf /var/lib/javadb/data/cachedb
svcadm enable javadb
EXUBERANT_CTAGS=/opt/ctags\-5.8/ctags OPENGROK_DERBY=1 OPENGROK_TAG=1 \
      /usr/opengrok/bin/OpenGrok index
```

 and reindex.