Add support for setting ports into the busy state

If a port's queue goes over 128kbytes, which is currently hard-coded, the
port is flagged as busy. If it drops back under this limit it's marked not
busy.
Add better handling for EINTR and EBADF