PHP-993: Merge return array of individual batches into one array
Fix zts build
Attempt#2 to modify the batch statistics according to the spec
Simplify free()ing logic
New test
Convert empty batches into a NOOP
CS as per PR comments
Add space after "switch" and "while" before "(", as per PR review

Fix it everywhere while I am at it
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
Merge pull request #599 from bjori/bulk-tweaks

Add stream-context support for listening to batch shipments

* bjori/bulk-tweaks:
  WS as per cs review
  Add stream-context support for listening to batch shipments
  Order couple of function more logicly, marking them static & add comment