Refactor pkg/term package for Windows tty support

Signed-off-by: John Gossman <johngos@microsoft.com>
Extract client signals to pkg/signal

SIGCHLD and SIGWINCH used in api/client (cli code) are not
available on Windows. Extracting into separate files with build
tags.

Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
Consolidate tmpdir implementations, include Windows

Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
Extract TreeSize to daemon build

TreeSize uses syscall.Stat_t which is not available on Windows.
It's called only on daemon path, therefore extracting it to daemon
with build tag 'daemon'

Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
Extract mknod, umask, lstat to pkg/system

Some parts of pkg/archive is called on both client/daemon code. To get
it compiling on Windows, these funcs are extracted into files with
build tags.

Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
Refactor pkg/archive with a platform-independent stat struct

pkg/archive contains code both invoked from cli (cross platform) and
daemon (linux only) and Unix-specific dependencies break compilation on
Windows. We extracted those stat-related funcs into platform specific
implementations at pkg/system and added unit tests.

Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
Remove unused sysinfo parameter to runconfig.Parse

Removing dead code.

Signed-off-by: John Gossman <johngos@microsoft.com>
Use USERPROFILE path on Windows as home directory

Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
Fix input volume path check on Windows

used path package instead of path/filepath so that --volumes and
--device parameters to always validate paths as unix paths instead of
OS-dependent path convention

Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
Add windows/(386,amd64) to cross platforms list

Edited make scripts to append .exe to windows binary

Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>