(Bug 5080) Grab all subjects and logtimes from a journal
(Bug 5080) Separate out pruning logic into a method, and add duplicate detection

This is a best guess based on exact server timestamp and subject. If
both match exactly, we figure that this was a previously imported entry,
or maybe crossposted entry, that is not linked properly (as an import /
crosspost) for some reason.
(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.
Merge pull request #498 from afuna/importer-heuristic-bug5080

(Bug 5080) Detect duplicates based on timestamp / subject