compile via object files
remove conflicting _POSIX_C_SOURCE definition
move winch check to top of loop

should change nothing, allows us to use loop condition
better name for !stop: attached
detach on EOF from attached client

Now "echo command | dtattach bash-sock" will return a successful exit
status.
return 3 from dtattach on master termination

Normal exit for dtattach is assumed to be detaching.  If it closes
because the master terminated, return a code that indicates that.
Current return values from dtattach are:

0 - detached
1 - error
2 - connection refused on socket
3 - master terminated
move normal output from dtattach into dtach script

[detached] now displays appropriately, and using dtattach directly will
not display it (a la scripting)
remove unneeded `tput cnorm' lines