code clean up
* pulled out testing specific code from heka.encoders into heka.tests.helpers