implemented paging on groups list

@mattdrayer added paging support to groups list api. Please review.