refactor of the s3 input

This PRs includes a lot of changes.

Ruby code cleanup, following the STYLE.md
It now use the aws_config mixing support IAM roles fix #1778 fix #1575
the plugin also use standard codec
refactoring of the code to improve clarity and allow easier testing
Created initial test suite for it.
Cloudfront is now a codec fix #1630
Gzip decode is now a codec initial work for #1895