(Bug 5080) Log when we skip an entry because it looks like a dupe

So we know what's going on. We had to move this below the existing
checks, so that we can log only if it's a guess (not if we're certain
beacuse it had been previously imported/crossposted)

Also adds error-checking for db issues.