Fix return types from AsyncMysql queries (allow NULLS, support variants)

We did not properly export NULL values as null; instead they
appeared as empty strings.  In addition, we returned all ints, floats,
etc, as strings rather than properly typed.

This diff adds support for typed return values (ie, ints, floats, etc)
rather than just strings.  It also changes returned maps and vectors to
have actual null values when the underlying result set returned nulls.
fix embedded_data on freebsd

- remove hardcoded path in embedded_data
Fix leak in HphpArray::PopVec

If you pop the last element of a vector-shaped array,
we didn't decref the value or update the iterators properly.
Adding floor and ceil to interpreter/jit

Added floor and ceil to the interp and jit, also fixed some type conversion simplifications.
Fix silly bug when computing AttrDeepInit for a property

This diff fixes a crashing bug that can happen when multiple properties are
declared in a single statement and some of the properties are initialized
using collection literals, for example:

  public $x = Set {}, $y = 1;
Adjust error handling around socket closure for debugger

I had previously made the error handling in DebuggerCommand::Receive() too strict, and we'd fail to read available data from the socket when it was closed right after the data was sent. Loosened it, so if there appears to be data present we'll let the thrift layer have a chance to read the data.

I also moved the remaining log messages in that function to traces. There are cases where it is nice to see such a log message printed, but those are very rare and have not happened in the wild in the past many months. Log messages here particularly from the signal polling thread make our test output non-deterministic, and there's higher value in having stable tests :)
Display more diagnostic information in the case of test failure

When there is a failure in the test of debugging a server, give more diagnostics about failures to connect to the server.
Use the same output formatting for = command as is used for the print command.

The = command uses formatting that is user customizable and subtly different, by default, from the formatting used by the print command and the variable command. This has historical roots. It seems that the debugger used to use print_r, which is brittle, and the customization hook was introduced to work around this brittleness. This work around is no longer necessary since the debugger now has its own, robust way of formatting values as strings. Also, the difference between = and print is a perennial source of confusion for debugger users.
Add an option to hhvm to 503 requests if they have been sitting on the select queue for too long.

Add an option to hhvm to 503 requests if they have been sitting on the select
queue for too long. Threshold is configurable via runtime option and default off
for now. This works with either LIFO or FIFO mode. Basicallly before worker
dequeues a request, it peek at the beginning of queue to see if it's expired. If
so, it takes that off the queue and aborts the request without executing
anything.
Shutdown listen socket during segfault

During a segfault, we continue to accept incoming connections. This is
bad as the web server is unlikely to do a good job of serving these well.
Here we close the listen socket as soon as we discover the server is crashing.

A more robust way to do this might have been to have an array of FDs that
are listening for incoming connections. We could have then closed those
from the signal handling thread. This would complete the operation more
quickly and also handle a case where the libevent thread wasn't running.
However, this version was quicker to write.

I didn't understand why some signals didn't trigger the Segfaulting variable.
Does anybody have insight into that?
Debugger: cleanup server-side when the client disconnects while in run mode

Server-side cleanup was all driven by having a request thread see that either the connection with the client is closed, or the stopped flag on the proxy is set. However, if a debugger's in the run state and there's just no incoming requests against the right sandbox, then that would never happen. However, the signal polling thread is perfect to notice, there were just issues coordinating the cleanup of the proxy.

Modified stop() on the proxy to be callable from any thread, and to initiate cleanup of the proxy but pass the final cleanup off to another thread which can complete it. The signal polling and dummy sandbox threads are owned by the proxy, so they can't complete the work themselves. There was logic to queue cleanup just for the dummy sandbox, so I turned that into proxy cleanup and have it cleanup both.

I'll investigate making a unit test using the new framework that will test this, but that will come in a later diff since this diff is already quite involved.
Reduce boilerplate in RuntimeType constructors

RuntimeType has a lot of constructors that could share some
code, so I factored the common stuff into a private init() method.
Rename curUnit() to liveUnit()

curUnit and friends are evil and have been the source of many bugs
I've had to track down in the region translator. Time to force an audit of all
callsites. Most of the uses of curUnit() could be changed to grab the unit from
somewhere else, and the few where that wasn't reasonable use liveUnit to make
the intent more clear.
Rename curFunc() to liveFunc()
More cur*() -> live*() renaming
Remove ctrl-c test from debugger server test

We can never make the ctrl-c portion of the debugger server test 100% reliable. Removing that portion of the test. I'll replace it with something else soon. See task 2656173.
Move NormalizedInstruction out of translator.h

In the name of making incremental builds faster when headers
change, I've pulled NormalizedInstruction out of translator.h and
replaced it with a forward decl.
Fix type inference for ZendParamMode

Parameters of ZendParamMode functions aren't converted to the
destination type, so don't try to apply a type.
Fix pagelet timeouts

Push the remaining time through to the pagelet's HttpRequestHandler,
and fix HttpRequestHandler::handleRequest to use the timeout we pass in
(the latter was an inadvertent omission from my previous timeout diff).
fix shutdown crash when using PDO

- fix shutdown crash when using PDO

Closes #710