Separate reporters from triggers

Allows multiple reports per a patchset to be sent to pluggable
destinations. These are configurable per pipeline and, if not
specified, defaults to the legacy behaviour of reporting back only
to gerrit.

Having multiple reporting methods means only certain success/failure
/start parameters will apply to certain reporters. Reporters are
listed as keys under each of those actions.

This means that each key under success/failure/start is a reporter and the
dictionaries under those are sent to the reporter to deal with.

Change-Id: I80d7539772e1485d5880132f22e55751b25ec198
diff --git a/tests/test_scheduler.py b/tests/test_scheduler.py
index c7f730d..a473ccb 100644
--- a/tests/test_scheduler.py
+++ b/tests/test_scheduler.py
@@ -44,6 +44,7 @@
 import zuul.scheduler
 import zuul.webapp
 import zuul.launcher.gearman
+import zuul.reporter.gerrit
 import zuul.trigger.gerrit
 import zuul.trigger.timer
 
@@ -388,6 +389,8 @@
 
 
 class FakeGerritTrigger(zuul.trigger.gerrit.Gerrit):
+    name = 'gerrit'
+
     def __init__(self, upstream_root, *args):
         super(FakeGerritTrigger, self).__init__(*args)
         self.upstream_root = upstream_root
@@ -777,6 +780,9 @@
         self.timer = zuul.trigger.timer.Timer(self.config, self.sched)
         self.sched.registerTrigger(self.timer)
 
+        self.sched.registerReporter(
+            zuul.reporter.gerrit.Reporter(self.gerrit))
+
         self.sched.start()
         self.sched.reconfigure(self.config)
         self.sched.resume()