Added codec parameter and tests

This fixes Elasticsearch/puppet-logstash#109