Rename sys.IsTty to sys.Isatty to better reflect its origin.

Also add sys.IsTty that does about the same thing only
using ioctl and TCGETS to do its jazz.
Add some tracing stuff, wip to be honest, not sure I like it much.