- Check for EOF condition (remote has closed) before writing.

If we don't do this, then the write will still succeed even after the
remote has closed (half-closed in CLOSE_WAIT on our side), and the 2nd
write after will fail causing the previous event to be lost.
- Try forever to connect w/ exponential backoff
- remove a blank line
remove old event shims and fix any uses of it
remove commented code
Fixes different issues with the elasticsearch input

- The wrong scroll id was used in processing the new data
- Made the size and scroll time configurable
- Added extra option to enable the search_type=scan ( enabled by default )
  This improves the speed but disables sorting
Merge pull request #670 from electrical/es_input_fixes

Fixes different issues with the elasticsearch input
Merge pull request #660 from logstash/remove-old-event-shims

remove old event shims and fix any uses of it
fix event.tags usage on sort filter
Merge pull request #657 from logstash/tcp-output-client-close-fix

Tcp output client remote-has-closed fix
Merge git://github.com/logstash/logstash