Merge pull request #593 from bjori/PHP-993-merge-error-batches

PHP-993: Merge return array of individual batches into one array

* bjori/PHP-993-merge-error-batches:
  Add space after "switch" and "while" before "(", as per PR review
  CS as per PR comments
  Convert empty batches into a NOOP
  New test
  Simplify free()ing logic
  Attempt#2 to modify the batch statistics according to the spec
  Fix zts build
  PHP-993: Merge return array of individual batches into one array
Order couple of function more logicly, marking them static & add comment
Add stream-context support for listening to batch shipments
WS as per cs review