DERBY-6456: Infinite loop in NetworkServerControlImpl when reply >= 32k

Make sure the reply buffer in NetworkServerControlImpl is able to hold
the longest possible reply that it could see.

git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1559943 13f79535-47bb-0310-9956-ffa450edef68
DERBY-6455: Infinite loop in NetworkServerControlImpl.ensureDataInBuffer

Make NetworkServerControlImpl.ensureDataInBuffer() stop immediately if
it reaches end-of-stream.

Based on patch contributed by Martin Janda.

git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1559946 13f79535-47bb-0310-9956-ffa450edef68