[chromeperf] fix when findTopAnomalies requires more than the group has

Fixing errors in production like:
panic: runtime error: index out of range [2] with length 2

goroutine 62 [running]:
go.skia.org/infra/perf/go/anomalygroup/service.(*anomalygroupService).FindTopAnomalies(0xc000d85e90, {0x16e5d90, 0xc000c4e600}, 0xc00098a840)
	perf/go/anomalygroup/service/service.go:187 +0xd37
go.skia.org/infra/perf/go/anomalygroup/proto/v1._AnomalyGroupService_FindTopAnomalies_Handler.func1({0x16e5d90, 0xc000c4e600}, {0x13a8de0?, 0xc00098a840})
	perf/go/anomalygroup/proto/v1/anomalygroup_service_grpc.pb.go:235 +0x72
go.skia.org/infra/perf/go/backend.(*Backend).initialize.(*ServerPolicy).UnaryInterceptor.func1({0x16e5d90, 0xc000c4e600}, {0x13a8de0, 0xc00098a840}, 0xc000a00420, 0xc000992c78)
	go/grpcsp/authorization.go:133 +0x277

Bug: b/357619045
Change-Id: I8f1c675efec17f660f705a714048a9304ca3ed4e
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/892886
Reviewed-by: Ashwin Verleker <ashwinpv@google.com>
Commit-Queue: Wenbin Zhang <wenbinzhang@google.com>
diff --git a/perf/go/anomalygroup/service/service.go b/perf/go/anomalygroup/service/service.go
index 5103e1d..6633962 100644
--- a/perf/go/anomalygroup/service/service.go
+++ b/perf/go/anomalygroup/service/service.go
@@ -175,10 +175,11 @@
 	})
 
 	var count int
-	if req.Limit == 0 {
-		count = len(anomalies)
-	} else {
+	// If the request is 0 or is larger then the total of the group's anomalies, return all the anomalies.
+	if req.Limit > 0 && int(req.Limit) < len(anomalies) {
 		count = int(req.Limit)
+	} else {
+		count = len(anomalies)
 	}
 
 	top_regressions := []*ag.Anomaly{}