gopls/internal/test: have semtok work with gopls@v0.11.0

Previously in gopls v0.11.0, the gopls server only registered SemanticTokens as a dynamic registration. Meaning that the option `capabilities.TextDocument.SemanticTokens.DynamicRegistration` had to be `true` and the client had to be set up to handle it being dynamically registered; i.e. in the `RegisterCapability` callback.

So by implementing this functionality again on the client (which shouldn't be an issue since it is just supporting an additional server configuration), the benchmarks now work again for the baseline version. Tested running the command:

```
> cd gopls/internal/test/integration/bench

> go test -test.fullpath=true -benchmem -run=^$ -gopls_commit=gopls/v0.11.0 -bench ^BenchmarkSemanticTokens$ golang.org/x/tools/gopls/internal/test/integration/bench  
```

Change-Id: Iecf9efad800e4c9d0322f6288ee2ee106a6a6964
Reviewed-on: https://go-review.googlesource.com/c/tools/+/795701
Reviewed-by: Madeline Kalil <mkalil@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
diff --git a/gopls/internal/test/integration/fake/client.go b/gopls/internal/test/integration/fake/client.go
index aee6c1c..fcdf587 100644
--- a/gopls/internal/test/integration/fake/client.go
+++ b/gopls/internal/test/integration/fake/client.go
@@ -175,6 +175,15 @@
 			c.editor.watchPatterns = globs
 			c.editor.mu.Unlock()
 		}
+		if registration.Method == "textDocument/semanticTokens" {
+			opts, err := marshalUnmarshal[protocol.SemanticTokensOptions](registration.RegisterOptions)
+			if err != nil {
+				return fmt.Errorf("unmarshaling registration options: %v", err)
+			}
+			c.editor.mu.Lock()
+			c.editor.semTokOpts = opts
+			c.editor.mu.Unlock()
+		}
 	}
 	return nil
 }
diff --git a/gopls/internal/test/integration/fake/editor.go b/gopls/internal/test/integration/fake/editor.go
index 5133d88..03f9b1e 100644
--- a/gopls/internal/test/integration/fake/editor.go
+++ b/gopls/internal/test/integration/fake/editor.go
@@ -371,6 +371,7 @@
 	capabilities.TextDocument.SemanticTokens.Requests.Full = &protocol.Or_ClientSemanticTokensRequestOptions_full{Value: true}
 	capabilities.Window.WorkDoneProgress = true                                                // support window/workDoneProgress
 	capabilities.Window.ShowDocument = &protocol.ShowDocumentClientCapabilities{Support: true} // support window/showDocument
+	capabilities.TextDocument.SemanticTokens.DynamicRegistration = true
 	capabilities.TextDocument.SemanticTokens.TokenTypes = []string{
 		"namespace", "type", "class", "enum", "interface",
 		"struct", "typeParameter", "parameter", "variable", "property", "enumMember",