Do not allocate already existing counter group

Check that no group with the given name and index already exist before
allocating it. Add corresponding test case.

Change-Id: I563764af1d28043e909234ebb048239125ce6ecd
Related: OS#2757
diff --git a/src/rate_ctr.c b/src/rate_ctr.c
index 477339f..c27ac68 100644
--- a/src/rate_ctr.c
+++ b/src/rate_ctr.c
@@ -190,6 +190,9 @@
 	unsigned int size;
 	struct rate_ctr_group *group;
 
+	if (rate_ctr_get_group_by_name_idx(desc->group_name_prefix, idx))
+		return NULL; /* group already exist */
+
 	size = sizeof(struct rate_ctr_group) +
 			desc->num_ctr * sizeof(struct rate_ctr);