Introduce option to enable mongo, false by default

Since it gives link errors
Improve exception support in ext_zend_compat

Exceptions in Zend work by setting EG(exception) and adjusting the
VM opline pointer, and then returning to the C caller as usual.
C code is not exception-safe, and will leak memory or worse if C++
exceptions are allowed to propagate into it.

So:

* Set up try/catch blocks around C++ function calls. When an exception
  occurs, set EG(exception) to something sensible and save the exception
  object for rethrowing after the extension function returns.

* In zend_throw_exception(), just save the object for throwing later and
  return, don't actually throw it.

* Add a separate extension for testing aspects of ext_zend_compat, called
  ezc_test. It is based on ext_skel, and its tests are confirmed to work
  under Zend. The features I want to provide in ext_zend_compat were not
  properly tested by the existing extensions.

* Fix the JIT unwinder to properly interpret exception objects whether
  they are normal exceptions or "dependent" exceptions, i.e. thrown by
  std::rethrow_exception(). Document the GCC code I followed in doing
  this. This allows std::rethrow_exception() to be used in hhvm.

Also:

* Fix the use of default_exception_ce. It wasn't reliably initialised,
  but even if it were, it stores a pointer to request-local memory, so
  a static variable with no __thread was never going to work.

* Fix assertion from zend_call_function() when fcc->object_ptr is not
  initialised. With calling code such is found in Zend's
  call_user_func(), it will just point to uninitialised stack memory.
  Set it to NULL in fcc and fci, like what the Zend code does for
  global functions. Also document some pre-existing incompatibilities
  with the Zend interface.

* Pop the ZendExecutionStack even if an exception was thrown, otherwise
  memory will leak.
Remove .phpt files and remove a redundant clear()

Per ptarjan's comments on PR 1986.
Implement zend_fetch_class_by_name() and fix new_ZendObjectData_Instance()

* In Zend compat layer, implemented zend_fetch_class_by_name()
* Added relevant tests
* Fixed infinite loop in new_ZendObjectData_Instance() discovered in
  subsequent testing. You need a cursor to traverse a linked list.
EZC: Fix handling of exception types other than HPHP::Object

* Fixed ref counts
* Added tests
EZC: fix compile error on gcc<4.8

_Unwind_Exception_Class is not defined, so use uint64_t per the ABI.
EZC: In zend_is_callable_ex() allow fcc=NULL

Fixes yaml test failure due to null pointer deference.

Submitted on behalf of a third-party: Zend Technologies Ltd.
Source: PHP 5.6.0-dev
License: version 2.00 of the Zend license.
EZC: Whitespace and line length fixes