Add basic support for nonblocking read

This will allow nonblocking devices to tell "read" there are no bytes available to be read currently, by having their "input" function return "undefined".