Clean up connection.py
Clean up connection.py

Extract complex logic from report function.
Remove unused variables.

Change-Id: I6b1f2a189a5f519df34086b67d1d61c20e86d584

stackforge/monasca-statsd,stackforge/monasca-statsd