Fix standalone build for 3.11

Starting 3.11, only java 21 gerrit builds are being published even
though it is possible to build with both 17 and 21. For standalone build
to work, it is required to fetch approprite gerrit plugin api built with
java 17 which is not readily available. Hence, make it possible to build
with 21 using `--config=java21` flag on bazel commands.

Change-Id: I4fb7d37aa1aeb5250df6ca8c29c96c28fa01eb72
3 files changed