ReceiveCommits: Fix setting [PRIVATE] and [WIP] for updated changes
When the private and/or work-in-progress state of a change is modified
by pushing for review using any of the %private, %remove-private, %wip
or %ready options, the change notes of the updated changes do not have
the new status. To work around this, the new private/WIP state is set
by checking for the relevant flags in the magic branch.
When none of the private/WIP options are given, i.e. the states are not
being set on push, the states are detected from the change notes of the
updated changes, which contain the current (correct, unchanged) states.
In the latter situation, the states are set from the notes of the first
updated change, but then reused for all subsequent updated changes. As
a result, if the first updated change is private, all subsequent changes
will also be reported with the [PRIVATE] suffix even when they are not
actually private. The same occurs for the [WIP] suffix.
Fix this by reevaluating the private and wip states for each updated
Bug: Issue 9024