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.
Actually the sleep is not the relevant part here. The main point of the fix is that the `convert()` method should never proceed if there is no data available in `channelInputStream`. You can remove the sleep, but it in this case the `convert()` method would return null in many cases when the `writingToPipe` flag was just set but there's no data in `channelInputStream` yet. In these cases, the `run()` method would do another loop and retry to call convert() until it eventually succeeded. To avoid this unnecessary spinning I inserted this sleep.