Add support for a skip-if filter on jobs

There was previously no way to skip a job if the contents of a given
patchset did not require it to be run.  This meant that tempest jobs
would run in response to patchsets that would not affect their
execution, like those that only modified documentation or unit tests.
This change introduces a 'skip-if' configuration option that allows
jobs to be configured to not run when specified criteria are met.

Change-Id: I9b261f03ec00426160d9396f3a20312e89b624d4
diff --git a/zuul/model.py b/zuul/model.py
index b705982..5ac6f53 100644
--- a/zuul/model.py
+++ b/zuul/model.py
@@ -451,6 +451,7 @@
         self._branches = []
         self.files = []
         self._files = []
+        self.skip_if_matcher = None
         self.swift = {}
 
     def __str__(self):
@@ -476,6 +477,8 @@
         if other.files:
             self.files = other.files[:]
             self._files = other._files[:]
+        if other.skip_if_matcher:
+            self.skip_if_matcher = other.skip_if_matcher.copy()
         if other.swift:
             self.swift.update(other.swift)
         self.hold_following_changes = other.hold_following_changes
@@ -500,6 +503,9 @@
         if self.files and not matches_file:
             return False
 
+        if self.skip_if_matcher and self.skip_if_matcher.matches(change):
+            return False
+
         return True