Provide per-byte enumeration of a java.io.InputStream

Refactored and generalized the existing enumReader function to
produce a similar enumInputStream function.