Constexpr-eliminate GetCategoryGroupEnabled calls for popular categories

This CL allows to avoid the cost of calling GetCategoryGroupEnabled() in
TRACE_EVENT macros for popular categories, in a way that doesn't require more
macros, nor changing all the call sites.

The idea is to put all popular categories into a static global array so an
address of a category state may be determined at compile-time through a call
to a constexpr function.

This CL makes it impossible to use non constant expressions as a category name
in the tracing macros. All the call sites that don't satisfy this requirement
have to be converted. Hopefully, there aren't a lot of such callers.

This change reduces the code size generated from each trace macro by ~16 bytes,
check the full report here:
https://docs.google.com/document/d/1piIq_yi2fsqOEKObx0tFHeunMyX7hp2ZdAGKK6t0k80/edit?usp=sharing.
The total Android apk size savings are ~60 KiB.

Bug: 702718, 708990
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I9f7b48fd4ee614996feaabda3e5495fd9b786c3a
Reviewed-on: https://chromium-review.googlesource.com/c/1251361
Commit-Queue: Alexandr Ilin <[email protected]>
Reviewed-by: Scott Violet <[email protected]>
Reviewed-by: Primiano Tucci <[email protected]>
Reviewed-by: Tibor Goldschwendt <[email protected]>
Reviewed-by: Frank Liberato <[email protected]>
Reviewed-by: vmpstr <[email protected]>
Reviewed-by: Sami Kyöstilä <[email protected]>
Reviewed-by: David Turner <[email protected]>
Cr-Commit-Position: refs/heads/master@{#607975}
diff --git a/net/dns/host_resolver_impl.cc b/net/dns/host_resolver_impl.cc
index 201378766..818c55f 100644
--- a/net/dns/host_resolver_impl.cc
+++ b/net/dns/host_resolver_impl.cc
@@ -903,7 +903,7 @@
                                       const AddressList& results,
                                       int error,
                                       const int os_error) {
-    TRACE_EVENT0(kNetTracingCategory, "ProcTask::OnLookupComplete");
+    TRACE_EVENT0(NetTracingCategory(), "ProcTask::OnLookupComplete");
 
     // If results are empty, we should return an error.
     bool empty_list_on_ok = (error == OK && results.empty());