add $this to v[ariable] hhvm debugger cmd

Summary: $this does not end up in 'local variables' until referenced.  This diff adds $this to local variables debugger command.

Reviewed By: @jano

Differential Revision: D1624271
SPL object not implementing Traversable is now a recoverable error

Summary: When an argument to a call like `iterator_count()` did not implement `Traversable`, this used to throw a pure `fatal`. Since 5.6, it now throws a `catchable fatal` (i.e. `E_RECOVERABLE_ERROR` in PHP). Let's match.

Reviewed By: @ptarjan

Differential Revision: D1623321
typecheck: include declaration location for 'missing type_params' message

Summary: ... it's much easier to jump to the declaration inside
 editors (e.g in emacs), and more consistent with other "Definition is
 here" error messages we produce

Reviewed By: @int3

Differential Revision: D1625076
Make the rest of the Zend test use %s for catchable fatals

Summary: I did some. Let's do the rest.

Reviewed By: @ptarjan

Differential Revision: D1621884
Revert "Adding doctrine/dbal to framework parity test suite"

Summary: run.php dbal fatals - the test find command does not work.

refs facebook/hhvm#4006

Reviewed By: @paulbiss

Differential Revision: D1626509
Implement incstat in vasm

Summary: Added the addqim instruction to support incstat in vasm, eliminate the
incstat macro instruction.

Also remove the Stats::enabled() check in emitCall(); it was left over
from when we had trampolines. Further, delete the rip-addressing asserts;
one had a bug, and they were only useful before we changed RIPRelativeRef
to take an absolute address.

Remove the pushf/popf; we only emitIncStat() in places where its okay
to clobber flags. And if we make a mistake, vasm-xls will assert about
having two live status flags. And since its vasm, the fix can easily
use scratch registers and lea to avoid modifying flags. (load,lea,store).

Reviewed By: @jasone

Differential Revision: D1620331
Fix some request locals

Summary: icu's default locale can just be thread local.
There's no need to initialize s_signal_handlers on each request;
we can avoid the issues that solved by testing to see if its been
initialized. If not, the thread can't be expecting any signals.

Reviewed By: @bertmaher

Differential Revision: D1625632
Better handling of RequestEventHandlers

Summary: Its possible for a RequestEventHandler to get re-initialized
after its requestShutdown method has been called.

At the end of the request, we destroy the ExecutionContext, and so we
are left with a RequestEventHandler whose inited flag is set, but which
is not in the ExecutionContext. As a result, we never call requestInit
or requestShutdown for that handler ever again.

This tries to prevent the obvious ways that this can happen, and checks
for it when destroying the ExecutionContext.

Reviewed By: @ptarjan

Differential Revision: D1623445
Simple curl change

Summary: This is stemming from issue #4002, but I don't think fixes it.

With code like this:

```
<?php

$file = new CurlFile(__DIR__. '/curl_testdata1.txt');
$ch = curl_init();
curl_setopt($ch, CURLOPT_POSTFIELDS, array("file" => $file));
curl_exec($ch);
var_dump($file->name);
var_dump($file->postname);
```

`$postname` is empty in both PHP 5.6 and HHVM.

It will be tested by the issue raiser though on a real request when it lands to GitHub.

At the very least, this is a consistency fix. At the very best, a miracle happens

The claim is that on requests, HHVM is setting filename empty like this:

```
Content-Disposition: form-data; name="file"; filename=""
Content-Type: application/octet-stream
```

while PHP 5.6 it is:

```
Content-Disposition: form-data; name="file"; filename="/home/vagrant/Sites/poshonpennies.com/app/routes.php"
Content-Type: application/octet-stream
```

Reviewed By: @ptarjan

Differential Revision: D1621800
Use distcc instead of ccache for building in benchy

Summary: This will build folly and stuff slower, but if you are benchying
something with local hphp header changes it'll probably win on build times,
since there'll be better parallelism.

Reviewed By: @mhahnenberg

Differential Revision: D1627193
Fix JSON decode constant

Summary: Fixes #4018

Reviewed By: @JoelMarcey

Differential Revision: D1626488
Have FrameState track in and out states of blocks.

Summary: Currently FrameState uses its map of snapshots to map blocks to their
in-states, except for when we're building, then we map blocks that have
already been processed to their out-state for
IRBuilder::insertLocalPhis.

To clean things up and reduce confusion, lets just store both the in and
out state for each block.

Reviewed By: @swtaarrs

Differential Revision: D1619253
Raise emitCallNativeImpl() to vasm

Summary: bindcall{} calling a native method (whose bytecode body
is just a NativeImpl) instruction emits some glue and
then a plain call, no service request. Do it all with vasm.

Reviewed By: @swtaarrs

Differential Revision: D1617362
Convert resume and retransopt to vasm

Summary: resume and retransopt were simply macro operations that do a
service request by preparing a number of argumets, saving
vmsp and vmfp, then returning to enterTCHelper with a service
request opcode.

Add a RegMask argument to the ret{} instruction so we can exactly
model the lifetime of the return-value registers and service-request
argument registers.

This only ports enough of the old emitServiceReqWork functions to
support what was needed for resume and retransopt. Adding support
for ephemeral service requests will take a bit more fleshing out.

Reviewed By: @swtaarrs

Differential Revision: D1622304
is_object to return false for incomplete classes

Summary: This incompliance must be fixed for Symfony's FlattenException to work (checked by Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php).

Reviewed By: @jdelong

Differential Revision: D1574674
Make DateTime::modify work correctly

Summary: Right now, this code does not work in HHVM

```
<?php
$datetime = new DateTime();
$datetime->modify("2014-09-20 20:30");
echo $datetime->format('c');
```

It prints out the initial time upon construction as opposed to the modified time.

```
2014-10-16T17:29:03-07:00
```

PHP 5.6

```
2014-09-20T20:30:00-07:00
```

Fixes #3778

Reviewed By: @ptarjan

Differential Revision: D1622397
The HHIR CallsNative flag (N, NNT) is no longer needed.

Summary: Now that vasm-xls can see actual calls, we don't need the flag.

Reviewed By: @jdelong

Differential Revision: D1626565
Save the Typing_deps hashtable as well

Summary: I'm not sure how to create a case that fails without saving the
hashtable, but it seems like something that should be saved...

Reviewed By: @pikatchu

Differential Revision: D1610807
hh_server now accepts a list of files to recheck after load.

Reviewed By: @jwatzman

Differential Revision: D1610916
Don't pass root as an additional parameter.

Summary: It is already available from genv.options, so there's no point
in having it duplicated.

Reviewed By: @elgenie

Differential Revision: D1625185