Better support for partial buffer reads/writes in translog infrastructure

Some IO api can return after writing & reading only a part of the requested data. On these rare occasions, we should call the methods again to read/write the rest of the data. This has cause rare translog corruption while writing  huge documents on Windows.

Closes #6441

PS. I'll add java docs to the new Channels util class, but wanted to start the review process.
Ctahcing Throwable is always a bad idea, because it also catches InterruptedException and this causes the interrupt status to be ignored later.
You should be more selective in catching those Exceptions, the only one that can happen here should be IllegalStateEx and IOExeption? So please, use a multi-catch!