Ensure that CDataStream never reads from empty buffers.
Summary: On some systems, current implementation of CDataStream sometime can read from empty buffers.
Test Plan: Added test cases. Checked with @CCulianu that the test case indeed trigger the bug on some specific systems and made sure the patch fixes it.
Reviewers: CCulianu, freetrader, #bitcoin_abc
Reviewed By: CCulianu, #bitcoin_abc
Subscribers: CCulianu
Differential Revision: https://reviews.bitcoinabc.org/D355