inotify_read_event: wait for events using select(2)

There was some problem with read() returning EINVAL for file-related
events on directory watches; this commit fixes that by

  * using the `select` system call to wait for data to become available
    for reading on the inotify FD, and by
  * using the `FIONREAD` ioctl to determine exactly how much data needs
    to be read from the file descriptor so we can read it all at once
    and process events more efficiently.

As a side-effect, we also get a timeout parameter on `inotify_read_event`
thanks to the fact that `select` implements one that is easily supported
in wrapper code.

Note that this commit slightly changes the semantics of the Python
wrapper function in question: previously it was guaranteed that the
user-supplied callback would be called only once per invocation of this
wrapper function (which is no longer the case).  The user callback will
now be called once for each item in the first "group" of events
available for reading after the wrapper function is invoked.
strip `IN_` prefix from _all_ module constants

This renames Python module constant "IN_ONESHOT" to "ONESHOT" and
"IN_ONLYDIR" to "ONLYDIR" to match the naming style of the other
constants.
add support for older implementations of `inotify`

On certain supercomputing clusters, the installed version of inotify.h
predates the introduction of `inotify_init1` (which initially allowed
the programmer to specify that "close-on-execute" [IN_CLOEXEC] should be
set on the inotify file descriptor) and later additions to that file.

This commit adds support for those systems by working around the
missing interfaces to the maximum extent possible.  When needed, it

  * manually sets descriptor flags passed to the Python wrapper _after_
    creating the inotify file descriptor, and
  * skips definition of module constants that would request behavior not
    easily emulated.

This commit does *not* add full support for changes to the inotify
interface since its introduction; only those changes I need to support --
between July 2008 and today -- are handled.