WIP Cartridge Refactor - Add PHP support for threaddump

* Add proper return code to PHP cartridge
* Use V1 contract to report error
* Update cucumber tetss
Merge pull request #1817 from jwhonce/wip/threaddump

WIP Cartridge Refactor - Add PHP support for threaddump