Adding task to cleanup failed log processing jobs.

I really need to revisit this log processing queue stuff. It would be
best to simplify the queuing and automatically retry failed jobs so this
isn't a separate one-off task.
Fix a couple bugs when processing incomplete log data.