Enforce ref only for gerrit events that supply a ref

Invalid layout could be used and cause zuul to crash. If a ref
was specified for an event that did not supply a ref,
(e.g. patchset-created) then zuul would crash trying to match
the regex supplied in layout.yaml to event.ref, which would be
None. This results in all jobs failing, so this patch
makes sure that only the ref-updated gerrit event can have
a ref pattern specified.

Change-Id: I297e38f3749166ce54a946f6cbcf708744f20fa1
Remove docutils pin

This was added to work around bug 1091333.  A new sphinx has been
released and so this is no longer necessary.

Also update sphinx requirement with global requirements.

Change-Id: I9107884d964757a9154bdd1feb4ea6df4e9df43e
Switched documentation to point to storyboard.

We've migrated this project to storyboard, I'm updating the documentation links.

Change-Id: I32ca3ee67ba78cd8f2daf1247488264647e44617
Pin GitPython version to prevent test failure

Change-Id: I3cadf46e3b5d9264040d1a24535fa77b276f9236
Add gerrit owner information to status.json

gerrit.query does return the owner information, we can save that
in the Change object and serialize it to status.json

Change-Id: Ib505ef8703bc60058d2775f522fcc3d02910b05f
implement gerrit pagination in simplequery

gerrit defaults to a limit of 500 changes returned. Nova regularly has
more than 500 open reviews. This means that some operations aren't
seeing all the open reviews, and causing some oddness (like merge
check).

Implement implicit paging.

In looking at this code I also believe I found a double -1 slicing
error which would mean that we would miss some reviews being listed.

Change-Id: I00d47c05e4a740b61c690510593fd29eaef49679
Merge "Enforce ref only for gerrit events that supply a ref"
Merge "implement gerrit pagination in simplequery"
Fix KeyError: 'sortKey'

The data returned by the gerrit query are in the line format:

  <json for change 1>
  <json for change 2>
  ...
  <json for change N>
  <json of query stats>
  <blank line>

The current [:-1] dropped the blank line, and previously the Gerrit
trigger would then drop the query stats with a [:-1].  That has
since been removed.  However, it needs to be dropped before the
simpleQuery processor performs the sortKey lookup.

Instead, drop any lines which don't include 'sortKey', which means
they aren't valid data lines (they are either stats lines, the blank,
or some other cruft).

Change-Id: I2b8ffdc70af436b34e7cee431ec4820c6e2d91c3
Merge "Remove docutils pin"