Use multi-module to cleanup top level go.mod

Client: go

The go library itself does not have any third-party dependencies. We
have one third party dependency from the test code, which kind of
polluted from top-level go.mod file to the users of thrift go library.

We previous tried to clean that up by creating go.mod file at
lib/go/thrift, which caused issues to the release process and thus
reverted.

Use multi-module to separate tests requiring mock to their own modules
so that we can keep the top-level go.mod file clean.

Also some minor fixes on the github actions go workflow.
diff --git a/test/go/Makefile.am b/test/go/Makefile.am
index abed923..ff7ce68 100644
--- a/test/go/Makefile.am
+++ b/test/go/Makefile.am
@@ -19,11 +19,7 @@
 
 BUILT_SOURCES = gopath
 
-if GOVERSION_GE_118
-GOINSTALLEXTRA = -buildvcs=false
-else
-GOINSTALLEXTRA =
-endif
+GOBUILDEXTRA = -buildvcs=false
 
 THRIFTCMD = $(THRIFT) -out src/gen --gen go:thrift_import=github.com/apache/thrift/lib/go/thrift,package_prefix=github.com/apache/thrift/test/go/src/gen/$(COMPILER_EXTRAFLAG)
 THRIFTTEST = $(top_srcdir)/test/ThriftTest.thrift
@@ -44,13 +40,13 @@
 	touch gopath
 
 bin/testclient: gopath
-	GOPATH=`pwd` $(GO) install $(GOINSTALLEXTRA) -mod=mod ./src/bin/testclient
+	$(GO) build $(GOBUILDEXTRA) -o bin/testclient ./src/bin/testclient
 
 bin/testserver: gopath
-	GOPATH=`pwd` $(GO) install $(GOINSTALLEXTRA) -mod=mod ./src/bin/testserver
+	$(GO) build $(GOBUILDEXTRA) -o bin/testserver ./src/bin/testserver
 
 bin/stress: gopath
-	GOPATH=`pwd` $(GO) install $(GOINSTALLEXTRA) -mod=mod ./src/bin/stress
+	$(GO) build $(GOBUILDEXTRA) -o bin/stress ./src/bin/stress
 
 clean-local:
 	$(RM) -r src/gen src/github.com/golang src/thrift bin pkg gopath ThriftTest.thrift
@@ -58,8 +54,8 @@
 check_PROGRAMS: bin/testclient bin/testserver bin/stress
 
 check: gopath genmock
-	$(GO) test -mod=mod -v ./src/common/...
-	$(GO) test -mod=mod -v ./src/gen/...
+	$(GO) test -v ./src/common/...
+	$(GO) test -v ./src/gen/...
 
 genmock: gopath
 	sh genmock.sh