Add Candidate::type_name()

Candidate::type() is currently how the name of the type is fetched,
but that getter returns a non-standard type name.

Instead, I'm adding a new getter, type_name(), will follow up with
updating dependent code that needs the string, to use type_name (and
adapt to potential dependency on "local" or "stun") and then switch
type() to be enum based.

Also adding a test file for Candidate with a couple of basic tests to
start with.

Bug: webrtc:15846
Change-Id: I9b78b2405a9f962a3c07eaa8e72a79854c6f5ceb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339660
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41740}
diff --git a/api/BUILD.gn b/api/BUILD.gn
index e8d03f0..0c982a2 100644
--- a/api/BUILD.gn
+++ b/api/BUILD.gn
@@ -1430,6 +1430,7 @@
 
     sources = [
       "array_view_unittest.cc",
+      "candidate_unittest.cc",
       "field_trials_unittest.cc",
       "function_view_unittest.cc",
       "rtc_error_unittest.cc",
@@ -1445,6 +1446,7 @@
 
     deps = [
       ":array_view",
+      ":candidate",
       ":create_time_controller",
       ":field_trials",
       ":field_trials_view",
@@ -1458,12 +1460,14 @@
       ":scoped_refptr",
       ":sequence_checker",
       ":time_controller",
+      "../p2p:rtc_p2p",
       "../rtc_base:buffer",
       "../rtc_base:checks",
       "../rtc_base:gunit_helpers",
       "../rtc_base:platform_thread",
       "../rtc_base:rtc_event",
       "../rtc_base:rtc_task_queue",
+      "../rtc_base:ssl",
       "../rtc_base:task_queue_for_test",
       "../rtc_base/containers:flat_set",
       "../rtc_base/task_utils:repeating_task",