Fix/truncating-of-multibytes-characters

Fix an issue when creating frames with accented characters, I have changed the frame creation to use bytesize instead of length.
I have also moved the encoding method outside of the client class, it make things easier to test and support.

The test suite is currently broken and we cannot run the tests of the `lumberjack_spec`, the parameters format changed and the test were not updated.

Fixes: https://github.com/elasticsearch/logstash/issues/1480
Fixes: https://github.com/elasticsearch/logstash/issues/1807
![sharkie1](https://cloud.githubusercontent.com/assets/131818/5441519/f22d66e2-8445-11e4-85af-f9ee9e901892.jpg)