ARROW-3236: [C++] Fix stream accounting bug causing garbled schema message when writing IPC file format
ARROW-3236: [C++] Fix stream accounting bug causing garbled schema message when writing IPC file format

We were never reading this message (because the schema is contained in the footer), and the fact that it was malformed was not impacting the other messages in the file (obviously, since we have many unit tests verifying this).

Fixes #2559

Author: Wes McKinney <wesm+git@apache.org>

Closes #2560 from wesm/ARROW-3236 and squashes the following commits:

bf0856f1e <Wes McKinney> Fix stream accounting bug causing garbled schema message when writing IPC file format. Clean code

laurentgo/arrow,cpcloud/arrow,majetideepak/arrow,renesugar/arrow,laurentgo/arrow,icexelloss/arrow,majetideepak/arrow,renesugar/arrow,kou/arrow,laurentgo/arrow,cpcloud/arrow,tebeka/arrow,pcmoritz/arrow,laurentgo/arrow,tebeka/arrow,itaiin/arrow,xhochy/arrow,itaiin/arrow,apache/arrow,laurentgo/arrow,laurentgo/arrow,icexelloss/arrow,icexelloss/arrow,itaiin/arrow,xhochy/arrow,apache/arrow,laurentgo/arrow,itaiin/arrow,wesm/arrow,xhochy/arrow,renesugar/arrow,cpcloud/arrow,pcmoritz/arrow,pcmoritz/arrow,xhochy/arrow,pcmoritz/arrow,tebeka/arrow,pcmoritz/arrow,majetideepak/arrow,majetideepak/arrow,pcmoritz/arrow,cpcloud/arrow,majetideepak/arrow,xhochy/arrow,apache/arrow,xhochy/arrow,majetideepak/arrow,cpcloud/arrow,tebeka/arrow,wesm/arrow,kou/arrow,pcmoritz/arrow,itaiin/arrow,itaiin/arrow,laurentgo/arrow,laurentgo/arrow,icexelloss/arrow,wesm/arrow,wesm/arrow,majetideepak/arrow,cpcloud/arrow,icexelloss/arrow,majetideepak/arrow,icexelloss/arrow,itaiin/arrow,kou/arrow,pcmoritz/arrow,renesugar/arrow,kou/arrow,kou/arrow,pcmoritz/arrow,laurentgo/arrow,cpcloud/arrow,cpcloud/arrow,wesm/arrow,pcmoritz/arrow,xhochy/arrow,majetideepak/arrow,apache/arrow,xhochy/arrow,pcmoritz/arrow,pcmoritz/arrow,icexelloss/arrow,majetideepak/arrow,kou/arrow,xhochy/arrow,majetideepak/arrow,icexelloss/arrow,cpcloud/arrow,icexelloss/arrow,pcmoritz/arrow,xhochy/arrow,apache/arrow,icexelloss/arrow,wesm/arrow,wesm/arrow,apache/arrow,apache/arrow,cpcloud/arrow,itaiin/arrow,icexelloss/arrow,xhochy/arrow,renesugar/arrow,icexelloss/arrow,tebeka/arrow,tebeka/arrow,tebeka/arrow,apache/arrow,itaiin/arrow,itaiin/arrow,xhochy/arrow,wesm/arrow,laurentgo/arrow,itaiin/arrow,kou/arrow,kou/arrow,pcmoritz/arrow,renesugar/arrow,majetideepak/arrow,xhochy/arrow,wesm/arrow,majetideepak/arrow,cpcloud/arrow,cpcloud/arrow,laurentgo/arrow,renesugar/arrow,apache/arrow,apache/arrow,renesugar/arrow,laurentgo/arrow,cpcloud/arrow,renesugar/arrow,cpcloud/arrow,laurentgo/arrow,icexelloss/arrow,apache/arrow,majetideepak/arrow,renesugar/arrow,itaiin/arrow,xhochy/arrow,xhochy/arrow,tebeka/arrow,wesm/arrow,kou/arrow,itaiin/arrow,wesm/arrow,kou/arrow,apache/arrow,itaiin/arrow,itaiin/arrow,wesm/arrow,apache/arrow,tebeka/arrow,renesugar/arrow,apache/arrow,kou/arrow,kou/arrow,icexelloss/arrow,renesugar/arrow,renesugar/arrow,wesm/arrow,renesugar/arrow,renesugar/arrow,laurentgo/arrow,tebeka/arrow,kou/arrow,kou/arrow,majetideepak/arrow,pcmoritz/arrow,wesm/arrow