Added assertions to make sure that InputStream.empty and leastSize are consistent.
Removed ChunkedInputStream.m_empty to avoid data redundancy.

A rare bug has caused a state where m_empty==false and m_bytesInCurrentChunk==0, causing an infinite loop before.