Fixed infinite loop described in INT-3453.

Fixed an infinite loop in the `getNextBuffer()` method of `ChannelInputStream`.

JIRA: https://jira.spring.io/browse/INT-3453

I have signed and agree to the terms of the SpringSource Individual
Contributor License Agreement.
John, thanks for finding this and for the fix,

I am uncomfortable with a simple 5 ms sleep here to avoid the race condition; I'll give it some thought and report back.

Thanks again for your help.