Improve exception support in ext_zend_compat

See #1697 . The tests pass, it seems to work, so I thought this would be a good point at which to have a sanity check. I have squashed the work down to two commits -- you can see the unsquashed form at https://github.com/tstarling/hiphop-php/tree/dev , if that helps you to understand what I am doing here.

zend_throw_exception() is not yet tested, and neither is zend_handle_cpp_exception() in the std::exception or "..." case. But given the poor state of the code before I started, and the fact that the code is disabled by default, I thought this might already be of acceptable quality for a merge.