Handle missing db properly in test and prod. Fixes #4.

@jedp updated, mind merging in?

The `if !db` lines accommodate unit testing without redis running/installed.

Modify those lines to return 200/[] if testing, or 500 if in prod.

If we fill up the redis DB again, or it crashes or whatever, the service will stop infuriatingly telling you you've got zero emails. This is good.