Add config and rule to ignore self approval on labels

A frequently used Prolog rule is to ignore self approvals when
evaluating labels. The simple-submit-rules plugin has created such a
rule in Java instead of Prolog. All of the other label functions are
handled directly in core so it seems like a good fit, to also just port
this one into Gerrit core given that it is used quite often.

The new rule gets added as a separate rule so that we grow the
SubmitRules implementations more atomically (instead of just adding it
to DefaultRule).

We add tests that are mainly also just ported from simple-submit-rules.
Besides BUILD file and reference changes, the code was migrated to use
Flogger and we are more indicative to the user in case the uploader is the
only one who approved the change by adding an additional requirement.

The rule uses the uploader to make it easier to explain it to users.
Basing it on the author would come with the confusion that when you
cherry pick a change, you can self approve in case the author of the
original patch set was someone else. Basing it on the change owner would
mean you can hijack any change by uploading a patch set to submit
self-reviewed code.

Change-Id: I78b97f60ca1bb4aaf5386103c9228f76974feea4
diff --git a/Documentation/config-labels.txt b/Documentation/config-labels.txt
index 1aa6cd7c..ff43520 100644
--- a/Documentation/config-labels.txt
+++ b/Documentation/config-labels.txt
@@ -374,6 +374,15 @@
 link:access-control.html#reference[here], but must not contain `${username}` or
 `${shardeduserid}`.
 
+[[label_ignoreSelfApproval]]
+=== `label.Label-Name.ignoreSelfApproval`
+
+If true, the label may be voted on by the uploader of the latest patch set,
+but their approval does not make a change submittable. Instead, a
+non-uploader who has the right to vote has to approve the change.
+
+Defaults to false.
+
 [[label_example]]
 === Example