Use GetCodeOwnersClient in presubmit_support

This change also adds a target_ref flag to presubmit_support.py.

Recipe-Nontrivial-Roll: build
Change-Id: I6de6bb87fc1482b88d9fbebe5e4ad1dbd8ce9748
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2702792
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
diff --git a/owners_client.py b/owners_client.py
index 14c1bf5..915412e 100644
--- a/owners_client.py
+++ b/owners_client.py
@@ -228,6 +228,6 @@
 
   Defaults to GerritClient, and falls back to DepotToolsClient if code-owners
   plugin is not available."""
-  if gerrit_util.IsCodeOwnersEnabled(host):
+  if host and gerrit_util.IsCodeOwnersEnabled(host):
     return GerritClient(host, project, branch)
   return DepotToolsClient(root, branch)