Fix/s3 input/output with codec

This PRs includes a lot of changes.

- Merged @jsvd documentation improvement and added more documentation on new attributes Fix: #1340 
- Ruby code cleanup, following the STYLE.md
- It now use the aws_config mixing support IAM roles fix: #1778
- the plugin also use standard codec, added a new codec s3_plain to support previous version
- refactoring of the code to improve clarity and allow easier testing
- Created initial test suite for it.
- added simple tests to the aws_config mixin
- Fixed a bug causing events to be dropped when using the size_file option and the file rotation.
- Fixed a bug when the tags were nil in the plain text format. fix: #1626
- Fixed a bug when specifying the file_size, the doc says KB but the condition was on bytes.
- Added the option to specify a temp_directory for the working files. fix: #1860

cc @electrical 
SO MUCH MAGIC. LOVE IT.