codec/line: do charset conversion on flush

Also add tests to verify line codec does charset conversion on flush.

Related bugs:
* https://logstash.jira.com/browse/LOGSTASH-1789 (syslog input uses tcp input which defaults to line codec)