Allow to publish several counters in a row

Support publishing of multiple counters at once. This change the pipeline
and RPC calls to send a list of counter by default instead of only once
counter. This allows to make only one RPC calls when sending multiple
counters to be more efficient.

This implements blueprint publish-counters-list-rpc

Change-Id: Ie4155b35585f261e6ff9816e5a845a479151eefd
Signed-off-by: Julien Danjou <julien@danjou.info>
Move counter_source definition

The source of a Counter is not tight to the collector publishing system at
all, so move that a level above, otherwise code which don't import the
collector will fail using this variable.

Change-Id: Ie70b9b544505a8c7d9841163a7d5960cf677f3e4
Signed-off-by: Julien Danjou <julien@danjou.info>
compute: fix notifications test

This test isn't run anymore because it yields things, and that seems to have
no sense. Let's fix it.

Change-Id: I97a4a956895f973b5ece30848a845db3fa6d67c0
Signed-off-by: Julien Danjou <julien@danjou.info>
api: fix a test

This test name is a redefine of a test with the same name just above. Let's
find a unique name so both tests are ran.

Change-Id: I0c534e349e852fd6b30130646dcf1b5df0da02bb
Signed-off-by: Julien Danjou <julien@danjou.info>
Code cleanup, remove useless import

This is a massive removal of all useless import that are all over the code
and unit tests. There's also some simple dead code removal or move.

Change-Id: Ida1208b47f38e552219e3b909f8d7c4f22ba3273
Signed-off-by: Julien Danjou <julien@danjou.info>
Use Mongo finalize to compute avg and duration

This reduces the amount of things we do in Python and prepare for future
usage of more aggregation. It also returns real duration; API is then free
to override this with whatever it wants (and it does so).

Change-Id: I9850a4ab146612fbf85587f5553881a22acac67b
Signed-off-by: Julien Danjou <julien@danjou.info>
Merge "Use Mongo finalize to compute avg and duration"
Merge "api: fix a test"
Merge "Code cleanup, remove useless import"
Merge "compute: fix notifications test"
Merge "Move counter_source definition"