Fix panic with vi in busybox
Fix panic with vi in busybox

Following bugs are fixed:
1.Handle out of bound cursor movements: vi in busybox sets cursor
to (999,999) expecting it to be set to right, bottom correctly.

2.Correctly determine redirected non-terminal file.

Signed-off-by: Sachin Joshi <2885f1bf60e96afce1bb6e5f4bebb71e088a7081@hotmail.com>

moby/term