CommentJson fix: URL decode comment id before requesting comment context

This issue affected a small number of changes, especially old ones, e.g.
Ic60bacd528 and resulted in 500 - Internal server error when calling the
comments API with comment context enabled.

We request comment context as a post-step in CommentJson after computing
the CommentInfo entities. When building CommentInfo entities, we URL
encode the comment uuid (see [1]). We use those uuids to create the
comment context keys, ending up in not being able to locate those uuids
in NoteDb and failing in CommentContextCacheImpl#Loader. For example, we
try to lookup a uuid="AAAFUH%2F%2F%2Fcs%3D", but the actual comment in
NoteDb has uuid="AAAFUH///cs=".

In this change, we URL decode these uuids before creating the comment
context keys to fix this issue. We should request comment context with
correct comments uuids.

[1] https://gerrit.googlesource.com/gerrit/+/485fb21e09fa8ff5d32a1a4aec419b421b20b545/java/com/google/gerrit/server/restapi/change/CommentJson.java#206

Change-Id: I3b71e8289b41fe98ba1aee34c6e77002d37a64a7
diff --git a/java/com/google/gerrit/server/restapi/change/CommentJson.java b/java/com/google/gerrit/server/restapi/change/CommentJson.java
index edc8fcf..81b6fb3 100644
--- a/java/com/google/gerrit/server/restapi/change/CommentJson.java
+++ b/java/com/google/gerrit/server/restapi/change/CommentJson.java
@@ -190,7 +190,7 @@
       return CommentContextKey.builder()
           .project(project)
           .changeId(changeId)
-          .id(r.id)
+          .id(Url.decode(r.id)) // We reverse the encoding done while filling comment info
           .path(r.path)
           .patchset(r.patchSet)
           .contextPadding(contextPadding)