in_http: add support for 'add_remote_ip' config parameter.

The 'add_remote_ip' configuration parameter allows the output filter
to include the source IP address in a field called 'REMOTE_ADDR'.

It can be activated into the source as follows:

<source>
  type http
  port 9880
  add_remote_ip
</source>

Signed-off-by: Eduardo Silva <eduardo@monkey.io>
in_http: add support for 'cors_allow_origins' config parameter (#426).

This patch enable a partial and optional CORS support. For clients
that want to talk directly to this source, it allows to set a white
list of Cross Origin clients through the validation of the HTTP
Origin header. Usage:

 <source>
   type http
   port 9880
   cors_allow_origins http://example.com, http://www.treasuredata.com
 </source>

The new configuration key 'cors_allow_origins', allows to specify a
white list of domains, they must be separated by coma.

For those request that do not pass the CORS filter, the service will
respond with a '403 Forbidden' HTTP status code and close the connection.

Note: the CORS validation is based on the HTTP request headers, for hence
is NOT secure.

Signed-off-by: Eduardo Silva <eduardo@monkey.io>
in_http: config: use add_remote_addr instead of add_remote_ip

Signed-off-by: Eduardo Silva <eduardo@monkey.io>
in_http: config: cors_allow_origins now is a JSON array.

This patch makes the cors_allow_origins configuration key to store
a JSON array, it can be used as follows:

 <source>
   type http
   port 9880
   cors_allow_origins ["http://example.com", "http://www.treasuredata.com"]
 </source>

Signed-off-by: Eduardo Silva <eduardo@monkey.io>
Add EventRouter tests
Forgot to update required_ruby_version to 1.9.3 or later
Merge pull request #473 from edsiper/HTTP_improvements

in_http improvements
add new csv formatter