Index a field for reviewing a change after last owner update

This is a generalization of the "reviewed" bit in ChangeJson, which
indicates that the current user has commented on the change more
recently than the change owner commented or added a patch set. At
index time, record this field for each user for whom this is true.
This will help us avoid another path by which we touch the database
when rendering search results.

Searching by this field takes two forms. Searching for
"reviewedby:<user>" finds all changes where a comment by a specific
user was newer than the last update by the owner. Searching for
"is:reviewed" finds all changes where at least one specific user left
a comment more recently than the last update by the owner. This is
implemented by internally converting to "-reviewedby:none", where
"none" is a special sentinel field stored in the index.

This replaces the existing "is:reviewed" semantics, which were
somewhat confusing as they bore no relation whatsoever to the
"reviewed" field in ChangeInfo. The new semantics mean
"reviewedby:self" can match exactly the set of changes for which the
"reviewed" field would be set.

Change-Id: Icb7192eb5c41890ee3f3ef0fecb3d91d15b744f9
diff --git a/Documentation/user-search.txt b/Documentation/user-search.txt
index 8652c07..c335611 100644
--- a/Documentation/user-search.txt
+++ b/Documentation/user-search.txt
@@ -263,8 +263,8 @@
 
 is:reviewed::
 +
-True if there is at least one non-zero score on the change, in any
-approval category, by any user.
+True if any user has commented on the change more recently than the
+last update (comment or patch set) from the change owner.
 
 is:owner::
 +
@@ -306,8 +306,9 @@
 
 status:reviewed::
 +
-Same as 'is:reviewed', matches if there is at least one non-zero
-score on the change, in any approval category, by any user.
+Same as 'is:reviewed', matches if any user has commented on the change
+more recently than the last update (comment or patch set) from the
+change owner.
 
 status:submitted::
 +
@@ -350,6 +351,12 @@
 Changes containing a top-level or inline comment by 'USER', or owned by
 'USER'. Equivalent to `(owner:USER OR commentby:USER)`.
 
+[[reviewedby]]
+reviewedby:'USER'::
++
+Changes where 'USER' has commented on the change more recently than the
+last update (comment or patch set) from the change owner.
+
 
 == Argument Quoting