Add tests to cover codec autoswitch for stdin + tcp inputs

json->json_lines & plain->line

Tests for #1392
Closes #1394