erlang: fix receiving from port_command in unit tests
erlang: fix receiving from port_command in unit tests

Ports can send data bit by bit; make sure we read all the port has to offer in one go.
This should fix the "broken pipe" error we sometime got during testing.
We did not previously check the return of compare_all/2, which is why the bug was not noticed.
Incidentally, this change fixes dialyzer warnings too.

jonitis/msgpack-c,scopely/msgpack-cli,kern/msgpack-c,msgpack/msgpack-ruby,nurse/msgpack-ruby,ojundt/msgpack-ruby,juanrubio/msgpack-c,nurse/msgpack-ruby,soumith/msgpack-c,vashstorm/msgpack-c,soumith/msgpack-c,kpkhxlgy0/msgpack-c,msgpack/msgpack-cli,soumith/msgpack-c,vashstorm/msgpack-c,juanrubio/msgpack-c,jen20/msgpack-c,larskanis/msgpack-ruby,jpetso/msgpack-c,juanrubio/msgpack-c,undeadlabs/msgpack-cli,kou/msgpack-ruby,jen20/msgpack-c,jpetso/msgpack-c,cosmo0920/msgpack-ruby,GamePad64/msgpack-c,nobu-k/msgpack-c,GamePad64/msgpack-c,juanrubio/msgpack-c,larskanis/msgpack-ruby,kpkhxlgy0/msgpack-c,GamePad64/msgpack-c,lvfeng1130/msgpack-c,jpetso/msgpack-c,AALEKH/msgpack-c,undeadlabs/msgpack-cli,AALEKH/msgpack-c,GamePad64/msgpack-c,okkez/msgpack-ruby,kou/msgpack-ruby,vashstorm/msgpack-c,kou/msgpack-ruby,AALEKH/msgpack-c,lvfeng1130/msgpack-c,kern/msgpack-c,ojundt/msgpack-ruby,msgpack/msgpack-ruby,jonitis/msgpack-c,jen20/msgpack-c,lvfeng1130/msgpack-c,scopely/msgpack-cli,soumith/msgpack-c,kern/msgpack-c,vashstorm/msgpack-c,msgpack/msgpack-cli,kpkhxlgy0/msgpack-c,GamePad64/msgpack-c,AALEKH/msgpack-c,juanrubio/msgpack-c,msgpack/msgpack-ruby,cosmo0920/msgpack-ruby,jen20/msgpack-c,larskanis/msgpack-ruby,kpkhxlgy0/msgpack-c,modulexcite/msgpack-cli,jonitis/msgpack-c,lvfeng1130/msgpack-c,okkez/msgpack-ruby,jen20/msgpack-c,larskanis/msgpack-ruby,modulexcite/msgpack-cli,kern/msgpack-c,jonitis/msgpack-c,jonitis/msgpack-c,kou/msgpack-ruby,jpetso/msgpack-c,cosmo0920/msgpack-ruby,nurse/msgpack-ruby,AALEKH/msgpack-c,vashstorm/msgpack-c,nobu-k/msgpack-c,nobu-k/msgpack-c,kern/msgpack-c,cosmo0920/msgpack-ruby,ojundt/msgpack-ruby,okkez/msgpack-ruby,okkez/msgpack-ruby,soumith/msgpack-c,jpetso/msgpack-c,nobu-k/msgpack-c,ojundt/msgpack-ruby,nurse/msgpack-ruby,lvfeng1130/msgpack-c