IncludedIn: filter out non-visible branches

The project's commit endpoint "Get Included In" returns the list of
branches and tags in which a change is included. This endpoint only
checked if the input commit is visible to the caller (see
CommitsCollections), but didn't check for caller's visibility on
branches and tags that are returned by this endpoint.

In this change, we filter out branches and tags that are not visibile to
the caller.

Note: The NullAwareCorrespondence class was copied from master because
we need it for the new test.

Bug: Issue 14732
Change-Id: I66f5b72926501fe2482a0f7fc91032bbf2eac43b
(cherry picked from commit 993378f07dad5e4fbcb4482ac97a98461e1b9743)
diff --git a/Documentation/rest-api-projects.txt b/Documentation/rest-api-projects.txt
index c1349aa..63c3279 100644
--- a/Documentation/rest-api-projects.txt
+++ b/Documentation/rest-api-projects.txt
@@ -2504,6 +2504,9 @@
 Retrieves the branches and tags in which a change is included. As result
 an link:rest-api-changes.html#included-in-info[IncludedInInfo] entity is returned.
 
+Branches that are not visible to the calling user according to the project's
+read permissions are filtered out from the result.
+
 .Request
 ----
   GET /projects/work%2Fmy-project/commits/a8a477efffbbf3b44169bb9a1d3a334cbbd9aa96/in HTTP/1.0