fix shadow context tracking

john's commit removed the unregister call, which messes up the context tracking.
this commit fixes that.

refs #150
intercept ioctl, implement SIOCINQ and SIOCOUTQ requests

also changed DescriptorStatus and DescriptorType to typedefs.

closes #150