Add tests to cover codec autoswitch for stdin + tcp inputs

json->json_lines & plain->line

Tests for #1392
Closes #1394
inputs/base: Copy the codec's charset when switching.

Includes tests
Ignore RubyMine/IntelliJ dirs
consolidate java grok patterns
Merge branch 'pr/1518'
Update to reflect new JRuby default and USE_RUBY env option