Updates to the affinity router test framework as
well as bug fixes to the affinity router found by
the test framework.

Change-Id: I90e6baa9e9ee11bd8034498b8651e9e14512e528
diff --git a/afrouter/afrouter/api.go b/afrouter/afrouter/api.go
index 7f7ba54..5766e8d 100644
--- a/afrouter/afrouter/api.go
+++ b/afrouter/afrouter/api.go
@@ -20,8 +20,9 @@
 import (
 	"net"
 	"fmt"
-	"strconv"
 	"errors"
+	"runtime"
+	"strconv"
 	"google.golang.org/grpc"
 	"golang.org/x/net/context"
 	"github.com/opencord/voltha-go/common/log"
@@ -217,6 +218,10 @@
 	return &pb.Result{Success:true,Error:""},nil
 }
 
+func (aa ArouterApi) GetGoroutineCount(ctx context.Context, in *pb.Empty) (*pb.Count, error) {
+	return &pb.Count{Count:uint32(runtime.NumGoroutine())}, nil
+}
+
 func (aa *ArouterApi) serve() {
 	// Start a serving thread
 	go func() {