Check for URL already existing in db.
Add collision resolution.

In the rare case that SHA1 generates a duplicate hash for
different URLs, this must be handled.