Refactr peergrouper to export less API

Changes where made to make all of peergrouper changes external
but, after comments from @rogpeppe the changes have been
reworked to only export the necessary API from tests
and make a peergrouper_test packages only including the
part of the code that is indirectly using dummy provider
and therefore causing an import cycle when apiserver is
imported from state
Removed unnecesary commented code
Addressed @davecheney comments
Go fmted
Refactored loop to clarify logic
Merge pull request #978 from perrito666/refactor_peergrouper_tests_v2

Refactr peergrouper to export less API

Changes where made to make all of peergrouper changes external
but, after comments from @rogpeppe the changes have been
reworked to only export the necessary API from tests
and make a peergrouper_test packages only including the
part of the code that is indirectly using dummy provider
and therefore causing an import cycle when apiserver is
imported from state