Make AccountResolver:resolveExact resolve accounts for usernames as well

The current approach to resolve accounts for usernames is to
use AccounResolver:resolve, however this method use fuzzy
matching if no exact match can be found and this is not always
wanted e.g you may get an unexpected account if you use a
username of an inactive account. This change make it
possible to use resolveExact instead.

Bug: Issue 355451194
Release-Notes: AccountResolver:resolveExact can now resolve accounts for usernames
Change-Id: I5aebf06b5edaab63e50aaa8d410f5b4edece1690
diff --git a/java/com/google/gerrit/server/account/AccountResolver.java b/java/com/google/gerrit/server/account/AccountResolver.java
index 7aa25b6..d84d790 100644
--- a/java/com/google/gerrit/server/account/AccountResolver.java
+++ b/java/com/google/gerrit/server/account/AccountResolver.java
@@ -591,6 +591,7 @@
           .add(new BySelf())
           .add(new ByExactAccountId())
           .add(new ByEmail())
+          .add(new ByUsername())
           .build();
 
   private final AccountCache accountCache;