Add enough BUILD files to make it possible to `bazel build packages/core/test` Also re-format BUILD.bazel files with Buildifier. Add a CI lint check that they stay formatted. PR Close #20768
We were missing quite a bit of test coverage, this is the start of recreating it. PR Close #19703