Add buffering for RevivableInputStream, fixes #2.
Handle potential synchronization issue.

requestData may be set to true before the reader has entered its waiting
state.