INT-3453 Race Condition in NIO Connection

JIRA: https://jira.spring.io/browse/INT-3453

Race condition in `TcpNioConnection` could cause an
assembler thread to be tied up when there is not
any data to process. Thread is not freed up until
more IO occurs on the socket (or it is closed).

Race condition is caused by the `writingToPipe`
boolean; the assembler could see it `true` when
there is no data present (not yet reset by the
IO thread).

- Move `writingToPipe` to the `ChannelInputStream` (rename to `pendingData`)
- Set it before launching an assembler
- Reset it atomically under `pendingDataLock` in `write` after the `available` property has been incremented
- The assembler reads its value under the `pendingDataLock`.

It is now not possible for `pendingData` to be true when the data that was pending has been processed.