Do not wait twice as much on dupe messages and unknown problems

A logic error in how waits are calculated made the wrapper wait too long on unknown errors and duplicate messages. Waiting longer means shorter backoffs, but...
Merge pull request #1 from badp/master

A few improvements