Fix #6509: Interactive container hangs when redirecting stdout

Cli IsTerminal() SYS_IOCTL operation should be determined from STDIN,
not from STDOUT.

Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
DockerCli: Check IsTerminal() for both STDIN and STDOUT

`docker events > /tmp/out` should not print control
characters to non-terminal STDOUT.

This addresses commit 26b4a4920adca614f6be17a96f254f331271faf0
without creating regression described in issue #6509.

Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
Add DockerCli tests

Signed-off-by: Tibor Vass <teabee89@gmail.com>
Merge pull request #8233 from tiborvass/pr-7658

Fix Interactive container hangs when redirecting stdout