Make IRC bot list which failures were seen in which job.

Instead of saying you failed x jobs, because of y bugs. Map the two.

Some refactoring was needed to add unit tests.

Change-Id: I1c49c8cd4df24c7fb4c152e188f74caa13dfed9c
Merge "Make IRC bot list which failures were seen in which job."