Broke DSLWriter into two separate classes

As DSLWriter evolved, it ended up performing two unrelated duties:

1. Holding per-thread state which is referenced throughout SkSL
   (including non-DSL code)
2. DSL-specific utility functions

There's no reason for those to be contained in the same class, and
there's also no reason the per-thread state should be held in a
DSL-specific class. This breaks out an SkSL::ThreadContext class to hold
the state info, leaving the DSL utility functions behind in DSLWriter
(which should perhaps be renamed, but that's a job for a future CL).

Change-Id: Iccd45314bd9b37d4a1d3e27920e32a50c0b07d7c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456736
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
diff --git a/tests/SkSLDSLErrorLineNumbers.cpp b/tests/SkSLDSLErrorLineNumbers.cpp
index 8375334..cd87dea 100644
--- a/tests/SkSLDSLErrorLineNumbers.cpp
+++ b/tests/SkSLDSLErrorLineNumbers.cpp
@@ -11,6 +11,7 @@
 #include "src/gpu/GrGpu.h"
 #include "src/sksl/SkSLCompiler.h"
 #include "src/sksl/SkSLIRGenerator.h"
+#include "src/sksl/SkSLThreadContext.h"
 #include "src/sksl/dsl/priv/DSLWriter.h"
 
 #include "tests/Test.h"
@@ -42,7 +43,7 @@
                 msg.data());
         REPORTER_ASSERT(fReporter, pos.line() == fLine,
                 "Line number mismatch: expected %d, but received %d\n", fLine, pos.line());
-        DSLWriter::Compiler().handleError(msg, pos);
+        SkSL::ThreadContext::Compiler().handleError(msg, pos);
         fMsg = nullptr;
     }