logtree: implement LeveledLogger interface

This implementes the equivalent of StructuredLogger from go/logtree as
a pure interface for further implementation by LogTree (or other logging
mechanism, eg. in tests).

StructuredLogger was a slightly poor name (because of the unfortunate
industry understanding of what structured logging is), so we go ahead
and rename that. Once this change goes through, the design document will
be reflected to rename 'Structured Logging' to 'Leveled Logging'.

We base the API off of github.com/golang/glog, but without a single
global instance. Other API differences include:
 - No {Info,Warning,Error,Fatal}ln calls, as these are pretty much
   equivalent to {Info,Warning,Error,Fatal} calls.
 - V(n) now returns an interface with .Enabled(), instead of a boolean
   value. This is necessary as the returned value will have to carry
   its corresponding LeveledLogger instead of calling global functions.

Test Plan: plain interface, untested

X-Origin-Diff: phab/D620
GitOrigin-RevId: 06c7e3a88751ff7503e8106fac2360cf8de621c4
diff --git a/core/pkg/logtree/BUILD.bazel b/core/pkg/logtree/BUILD.bazel
new file mode 100644
index 0000000..c3d1bd8
--- /dev/null
+++ b/core/pkg/logtree/BUILD.bazel
@@ -0,0 +1,8 @@
+load("@io_bazel_rules_go//go:def.bzl", "go_library")
+
+go_library(
+    name = "go_default_library",
+    srcs = ["leveled.go"],
+    importpath = "git.monogon.dev/source/nexantic.git/core/pkg/logtree",
+    visibility = ["//visibility:public"],
+)