Ganglia poller: Untested rewrite to try to create more maintainable code

This change tries to do a couple of things. It pulls references to CONF up into constructors or keyword arguments to try and make it possible to override them in test circumstances.

It switches explicitly indexed loops to use enumerate and it changes the query parameter generation to use a for comprehension.

It compiles but I haven't tested. This aims to be like for like.