array_keys($arr) and array_keys($arr, NULL) should behave differently

In Zend, the latter form only returns keys which have a NULL
(or NULL-like if $strict==false) value.  The former returns all keys.
Fix typo and timing of setting User-Agent header in http wrapper

$context['user_agent'] was only being respected if
other headers happened to be getting set as well.
Even then, the header being set was "User_Agent" rather than
the correct "User-Agent" version.
use s_self rather than a string literal

Use s_self, s_parent and s_static instead of "self", "parent" and "static" in f_defined.
Inlined the fast-path of FPushObjMethodD in the IR.

Inlined the fast-path of FPushObjMethodD in the IR from
MethodCache::lookup. This should reduce the number of times we call
the MethodCache::lookup helper by inlining the common case where the
object's class hits in the target cache.
Fix bzdecompress

Bad memory allocation, the buffer needs to be large enough to fit all
the data we've decompressed so far plus the extra storage we're
incrementally allocationg, not just the incremental part.
Eliminate IncRef/DecRef pair when returning a local

In case a tracelet ends with CGetL + RetC, and IncRef/DecRef pair is
generated for the local being returned if it's ref-counted.  The
current ref-count optimization pass was unable to eliminate this, and
this diff tweaks the way HhbcTranslator generates the IR to enable the
optimization to kick in.

Here's the pattern generated without this diff:

CGetL 0
 t0 = LdLoc 0
 t1 = IncRef t0
RetC
 ExitWhenSurprised -> L
 DecRef t0
 RetVal t1
 ...

The source of t0 is not an IncRef, so the optimization doesn't apply.

With this diff, the IR is generated as:

CGetL 0
 t0 = LdLoc 0
 t1 = IncRef t0
RetC
 ExitWhenSurprised -> L
 DecRef t1
 RetVal t0
 ...

This enables the DecRef to be proved non-zero (becoming a DecRefNZ),
so it can be eliminated and the IncRef is sunk to the exit at L.
Add assert_throw and assert_log

This diff introduces assert_throw, assert_log, and always_assert_ versions of
the two. They behave similarly to assert, but assert_throw throws a
FailedAssertion exception instead of calling abort. This lets us catch the
exception and add additional debug info to the stacktrace file. In the case of
the IR, this is the current Trace. assert_log takes the condition to check and
a lambda that is expected to return a std::string. If the condition fails, the
lambda will be evaluated and the text returned will be included in the
stacktrace file.

I've left assert_throw off by default so people have to opt into it
locally or in Perflab (see the comment in assert_throw.h)
replaced null with uninit_null()
Use IRExtraData to link ExitTrace[cc] with smashable jumps

Use a new ExitData subclass of IRExtraData to link ExitTrace[Cc]
with the Jmp or Jcc that ends the trace, so the Jmp/Jcc can be
smashed later.  SSATmps should represent runtime values, whereas
these instr->instr pointers are for internal compiler use.
Call IncDecHelper only for Ints