Revert "Build ext_zend_compat extensions by default"

This reverts commit 8bf8e1379657ef69ed89ce1afe5873387acbf05f.

Not behaving as it's supposed to.  Revert until I can figure that out.
Fix incorrect ownerDocument after DOMDocument::createElement

Closes #1551

Fixed while investigating an ASAN failure when running PHPUnit's suite.

Reviewed By: @ptarjan

Differential Revision: D1144627
Fix memory management for xinclude nodes

Previously: ==580== ERROR: AddressSanitizer: attempting free on address which was not malloc()-ed: 0x604400212103

We were recursively freeing the node, including the attribute nodes - however, libxml2 doesn't malloc them separately - all we needed to do was unlink and free the root.

This fixes a fatal in PHPUnit's test suite.

Reviewed By: @ptarjan

Differential Revision: D1144722
Fix spl_autoload_unregister($unused_but_valid_handler)

If a valid handler is passed in, but wasn't registered, we'd just remove the last one:

- find_if() would return ::end()
- erase() treats that to mean erase the last one

Behavior in the new test was:
- correctly remove 'b'
- incorrectly remove 'a' when asked to remove 'b' again
- segfault when asked to remove 'b' a third time

Reviewed By: @ptarjan

Differential Revision: D1145531
Fix scoping for evaling default ReflectionParameter values

Closes #1449
Closes #1652

Reviewed By: @ptarjan

Differential Revision: D1141045
Prevent garbage on DNS_TXT records

Bug #64458 fixed an off by one error when decoding TXT records
that resulted with garbage at the end of the string returned.

Reviewed By: @scannell

Differential Revision: D1146140
Define missing IMAGETYPE_ constants

Defined IMAGETYPE_UNKNOWN and IMAGETYPE_COUNT

Closes #1634
Closes #1638

Reviewed By: @ptarjan

Differential Revision: D1144855

Pulled By: @scannell
Fix Zend strrpos compatibility

Fixes Zend strrpos compatibility and adds test.

Closes #1564
Closes #1632

Reviewed By: @bertmaher

Differential Revision: D1142139

Pulled By: @scannell
Remove dead function: emitContVarEnvHelperCall().

It was never called.

Reviewed By: @ottoni

Differential Revision: D1146574
Implement codegen for Call

After LdLoc went down, this is the next top punt. This forced me to get
the bind-call machinery working, and a bunch of other stuff -- it kind
of snowballed on me. Redispatching from prologues and handling stack
overflow also had to work. We were also forgetting to rewind the
globalData frontier if translation failed, and this change combined with
that to actually blow out globalData in a couple of tests.

Small bonus: deleting a bunch of "JIT::" that used to be "Transl::".

Reviewed By: @edwinsmith

Differential Revision: D1134414
Disable flaky zend test

Reviewed By: @edwinsmith

Differential Revision: D1147082
Support for Intel VTune Amplifier XE

Intel VTune Amplifier XE
(http://software.intel.com/en-us/intel-vtune-amplifier-xe), the
performance analysis tool, supports mapping of performance data from IP
addresses to function names and source file/lines for custom JIT
engines; the engine should provide mapping from generated code to source
using JIT API (http://software.intel.com/en-us/node/458070). This patch
add the reporting to hhvm, allowing to profile PHP code execution and
see both generated assembly and PHP source for hotspots.

The reporting is controlled via Eval.JitUseVtuneAPI runtime option, so
the default behaviour is not affected. If the option is set and hhvm is
profiled by VTune, the information on compiled code is reported via JIT
API and stored in data file which is used during postprocessing and data
visualization.

The patch includes some files from VTune; the are distrubuted under BSD
license.

Closes #1254

Reviewed By: @ottoni

Differential Revision: D1133559

Pulled By: @scannell
SimpleXML rewrite

Update SimpleXML to be compliant with Zend and fix a bunch of
tests.

Closes #1387
Closes #1530

Reviewed By: @ptarjan

Differential Revision: D1135882

Pulled By: @scannell
stop killing the socket until all data is sent

For small responses this was ok, since sending the data didn't take much time. For large requests, they would get truncated without this.

I checked for leaks by printing in the FastCGIConnection constructor and destructor and making sure they match up.

Closes #1631

Reviewed By: @simpkins

Differential Revision: D1147016
Switch Map and Set to use tracked smart allocators

Switches Map and Set to use tracked allocators. Vector uses
smart_realloc which will require a bit more work.

Reviewed By: @edwinsmith

Differential Revision: D1146939
Support for UNIX sockets

Add a new config param, Server.FileSocket. When
Server.FileSocket
is set it will be used inplace of a network socket for the primary
server. This uses a new parameter to ServerOptions, m_useFileSocket,
to toggle between treating the address as a socket path or a network
address.

To initialize a socket connection thrift expects the socket file to not
exist. To support this the 'something nice' retry in startServer will
unlink an existing socket only if fuser claims it is unused.
Server.EvilShutdown enables unlinking the socket regardless of current
users.

Closes #1594

Reviewed By: @ptarjan

Differential Revision: D1135876

Pulled By: @sgolemon
Iniitialize and Setup the StreamContext associated with a File

This fixes

   get_stream_context(CVarRef stream_or_context)

so that it works for streams as well as contexts which in turn means that

   stream_context_get_params($stream_or_context)

 and

   stream_context_get_options($stream_or_context)

will now also work for streams.
TempFile::sweep shouldn't free smart allocated objects