Rename X64_OPCODES to VASM_OPCODES

Reviewed By: @swtaarrs

Differential Revision: D1620130
Move zend curl tests back to good

Summary: It turns out if you have a proxy on, the result is different. This test assumes there
is no proxy available.

Reviewed By: @paulbiss

Differential Revision: D1619853
ARM immediate-folding

Summary: Templatize the original foldImms and provide an alternate implementation
of Folder. Add support for a few more immediate-form instructions to
vasm-arm.cpp.

Reviewed By: @swtaarrs

Differential Revision: D1618762
Use Stats.Enable in config instead of overloading Stats

Summary: Using "Stats" as both a boolean and as a section with children is not
only weird, it causes unintuitive behavior where overriding the section can
reset the boolean.

Reviewed By: @JoelMarcey, @markw65

Differential Revision: D1615419
Catchable fatals need %s replacement too

Summary: Following up on D1604585 where PHP 5.6.1 tests were imported, some good tests were moved to bad. Here is the first of a couple followup diffs to try to get them back.

We needed to have `%s` in `.expect` files for `Catchable fatal errors`

We have about 12 tests left to get back to good

Reviewed By: @paulbiss

Differential Revision: D1619651
Create test for coerce param to string on objects with bad toString

Summary: Added a test for fix #5323338

Reviewed By: @bertmaher, @jdelong

Differential Revision: D1614697
Split NewPackedArray into multiple IR nodes

Summary: NewPackedArray currently calls out of line to a C++ helper
function which allocates a new PackedArray and populates it with values
previously pushed to the stack. We'd like to inline all of this for
sufficiently small array literals.

The first step is to break NewPackedArray into its subcomponents, namely doing
the array allocation (which is represented with AllocPackedArray) and then
initializing each of the slots in the array with previously computed values
(which is represented with InitPackedArray).

Also added InitPackedArrayLoop as an alternative to InitPackedArray if the
array literal has more elements than we're comfortable unrolling.
It iterates back up the stack, copying values into the newly allocated
packed array.

Reviewed By: @jdelong

Differential Revision: D1587607
Content-Type should only be set once when handling admin server requests

Summary: Instead of setting multiple Content-Types, change the Content-Type to what is being returned.

This caused problems when fronting the admin server with Apache. For some commands it was fine (eg check-load) but for commands that returned html, xml or json Apache would return a 500 error and complain about

```
FastCGI: comm with server "/hhvm-admin" aborted: error parsing headers: duplicate header 'Content-Type'
```

After using the fcgi CLI protocol to see what hhvm was sending back I noticed that HHVM would sometimes send back two content types: always text/plain followed by the actual content type, say application/json. After poking through the code I noticed that it seems to do just that: when an admin server request received it would set the Content-Type to text/plain and if the command returned some other content type it would set *another* Content-Type header to the real Content-Type.

This patch changes that behavior to change the existing text/plain header to the real Content-Type instead o
Closes https://github.com/facebook/hhvm/pull/3941

Reviewed By: @paulbiss

Differential Revision: D1606946
Uninitialized collator is recoverable error

Summary: PHP 5.6 has made an unitialized collator a `catchable fatal error` instead of a `fatal error` that is unrecoverable.

Change our implementation to allow this. I tried to match the return values of PHP 5.6 if we run into a recoverable error

Reviewed By: @ptarjan

Differential Revision: D1620402
KernelVersion supports more version formats

Summary: This doesn't handle every possible case, but should handle most common cases. We can prevent more crashes like occurred in #3513

Fixes #3979

Reviewed By: @ptarjan

Differential Revision: D1617809
Add some ascii art to datatype.h

Summary: I've had to do this every time I think about data type bits, so let's
leave it in.

Reviewed By: @ottoni

Differential Revision: D1615447
Build against bundled sqlite if version is bad

Summary: Running hhvm against sqlite 3.8.2 fails with:
'COMMIT;' --> (5) cannot commit transaction - SQL statements in progress

Without this patch the cmake scripts will use the bundled copy of sqlite
if 3.8.4 <= version < 3.8.6.  With this patch the range is now
3.8.2 <= version < 3.8.6 so hhvm will not try to run against sqlite 3.8.2.

Closes #3994
Closes https://github.com/facebook/hhvm/pull/3995

Reviewed By: @paulbiss

Differential Revision: D1621175
Change typing of invariant() to return void

Reviewed By: @jwatzman, @elgenie

Differential Revision: D1617501
DynamicYield: do not provide get-via-yield

Summary: Do not implicitly define getFoo() methods when yieldFoo() is defined in a DynamicYield class.

Reviewed By: @elgenie

Differential Revision: D1610941
use statically sized arrays in DateTime extension

Reviewed By: @elgenie

Differential Revision: D1612621