pipeline, publisher, transformer: reorganize code

This move a bit of code to make it less Ceilometer centric.
This is part of blueprint oslo-multi-publisher

Change-Id: I2eb174cb3000c9cca7d3771a2ab66a1a948f5cd9
Signed-off-by: Julien Danjou <julien@danjou.info>