Missing `require "socket"` in elasticsearch output

Since https://github.com/elasticsearch/logstash/commit/521cd1aeb7374ca311537a9382d0758f82a37274, the elasticsearch output has a dependency on socket.  Requiring it here fixes a NameError that occurs, for instance, if an input that does not `require "socket"` is used.