Prevent duplicates in the DB

On a rather busy system, I experienced issues from time to time with "double entries" in the entries table, i.e. entries having the same `entry_id`. That broke XML output (because an array occured where a string would've been fine).

I fixed that issue by making the `entry_id` a unique key. No problems anymore.