Refactoring and cleaning of the S3 outputs

This PRs includes a lot of changes.

- Merged @jsvd documentation improvement and added more documentation on new attributes Fix: https://github.com/elasticsearch/logstash/issues/1340
- Ruby code cleanup, following the STYLE.md
- It now use the aws_config mixing support IAM roles fix https://github.com/elasticsearch/logstash/issues/1778 fix https://github.com/elasticsearch/logstash/issues/1575
- 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.
- 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 https://github.com/elasticsearch/logstash/issues/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 temporary_directory for the working files. fix https://github.com/elasticsearch/logstash/issues/1860
- S3 output issue when working with multiple workers added a threaded uploader fix https://github.com/elasticsearch/logstash/issues/1915
- S3 output: when the codec is started it will try to create a simple file on your bucket to test the permissions fix https://github.com/elasticsearch/logstash/issues/1914