Fix/accents

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
Not sure my reviewer will accept this patch, he is a shark fan.. :wave: @jordansissel