Reduce allocations for ImmutableMap and VectorData

ImmutableMap was doing 3 mallocs (one for the ImmutableMap
itself, one for the hash table, and one for the buckets). In
addition, it was pointlessly rounding up the number of
buckets to the next power of two. Reduce it to one malloc,
and only allocate the required number of buckets.

Similarly SharedVariant::VectorData was doing two mallocs. Reduce
to 1 by inlining the data.
Remove IRFactory argument from InstructionBuilder

This was an artifact from a mid-refactor stage when
ExtendedInstruction wasn't gone yet (it always needed an IRFactory to
be created).
Fix data flow when a try block returns

We approximate the dataflow for try/catch by adding
edges from the start and end of the try block to the start
of every catch. But a top level return in the try block will
kill the edge from the end.

This diff explicitly adds edges from a return in a try block
to every catch. This is sub-optimal, and still misses a
hopefully unlikely case; I'll follow up with a bigger fix to
control flow.
Add new MarkerInstruction subclass for HHIR Marker

The Marker opcode's fields did not overlap with DefLabel,
nor do we ever branch to a Marker; so give it a separate
subclass and clean up the code.
Guard saving persistent PDO connections which are invalid.

Handle a couple edge cases where an active PDO handle dies
before request shutdown can put it back into the persistent
connection pool.
Dont create VarEnv's for functions that dont expect them

Inside Unit::mergeImpl, a ReqDoc would create a new local
VarEnv if the current function didnt already have one. That was
wrong because the unit must have been required via either ReqSrc,
ReqMod or fb_autoload_map. In addition, it meant that we were
attaching a VarEnv to a function that might not be marked
AttrMayUseVV - with the result that we would leak the varenv.
Document the guard instructions
Add lcfirst() function
Pass options and full context through to wrappers
A few more Marker cleanups

Remove stale friend decls, using no-op macro for Marker.
Remove unused runtime options
Replace CT_ASSERT with static_assert

Since static_assert is supported now, we're replacing CT_ASSERT with it.
Added descriptions to each assertion as required by static_assert.
Forget about the stack slot builtins write to.

If you line up a tracelet *just* right, you can have a live
register for the stack slot that FCallBuiltin outputs. Since FCallBuiltin
works in-memory, this register will contain a stale value. This can
cause arbitrary badness; it was first sighted by Emir as a branch that
goes the wrong way in PHP.
Disentangle perf-pid.map and DwarfInfo generation

DwarfInfo takes up a lot of memory in production,
and is only needed if we want to see PHP symbols in core
files. Disentangle it from perf-pid.map generation, which is useful
for profiling.
Reduce jobs multiplier under hhvm
Modify hphp to batch units together when writing to a repo.

Modify hphp to batch units together when writing to a repo, in order to
reduce transaction commit overhead.  Do all writes on the main thread,
in order to avoid database lock contention.

Short-circuit FunctionScope::RecordFunctionInfo() unless in WholeProgram
mode.  This removes a major point of lock contention.
Add basic TypedValue by value support to cgCallHelper

This expands ArgDesc and cgCallHelper to fully support
passing TypedValues by value to helper functions, and changes all
relevant helpers to take TypedValues by value, instead of taking value
and type as two separate arguments. I expect that we might need to
teach cgCallHelper how to emit >6 arguments at some point, but that's
not needed yet.