Factor arch-independent code out of code-gen-x64

I also noticed it was possible to generate an X64 jmp in the
ARM code stream, so I pushed the jump-to-next-block logic down
into cgBlock(), and made cgBlock arch-independent as well.
Other than that, this is mostly just moving code around and
fixing up header dependencies.

Reviewed By: @ottoni

Differential Revision: D1209355
PHP5 Compatibility: Use a dummy error_context in error_handler

The 5th argument of error_handler (in set_error_handler) should be of array type rather than a string type. Since currently we haven't implemented the error context, we should first populate this argument with an empty array.

Closes #1500

Reviewed By: @ptarjan

Differential Revision: D1223667
Break the circular dependency between IRBuilder and Simplifier

The dependency chain that encompasses how Simplifier gets its results
into IRBuilder looked like this:

  optimizeInst -> optimizeWork -> Simplifier::simplify ->
  Simplifier::gen -> IRBuilder::gen -> optimizeInst

This is suboptimal if you're trying to tease out parts of Simplifier so
that it can be unit-tested. This diff breaks that dependency.

The main point is to reformulate the interface to Simplifier::simplify
so that it reflects what the result of simplification actually is: zero
or more instructions, along with an SSATmp to use in place of the
simplified instruction's dst. This way, Simplifier can return multiple
instructions without needing the backdoor afforded by IRBuilder::gen.

The new setup is that Simplifier recursively calls itself directly.  One
notable consequence is that we no longer do CSE interspersed with
simplification (since IRBuilder::optimizeWork does CSE); instead, we do
all simplification up front and then do CSE on the result. I think this
should produce the same output, and may do so with fewer CSE lookups.

Reviewed By: @swtaarrs

Differential Revision: D1219292
remove extra utc()

It is checked higher in the block

Reviewed By: @fredemmott

Differential Revision: D1223168
Output a progress bar when running the tests in normal mode, when running in a terminal

Closes #1795

Reviewed By: @fredemmott

Differential Revision: D1223265
s/hphp_get_debugger_info/__SystemLib\debugger_get_info

Our naming convention is to use the `__SystemLib` namespace for internal-only functions. Sadly namespaces don't work for IDLs or HNI so this is my best compromize

Reviewed By: @mikemag

Differential Revision: D1218769
make apache_request_headers not segfault

We haven't sent any headers, then this function segfaults.

Reviewed By: @sgolemon

Differential Revision: D1223734
support null chars in default arg strings

In #1600 we are actually supporting printing of default args, which evals them. All this stuff uses c-strings all the way down so we need to escape nulls.

Reviewed By: @elgenie

Differential Revision: D1223776
Disable flaky zend test

Reviewed By: @bertmaher
Remove "HipHop" from error message

Remove "HipHop" from error message

Reviewed By: @markw65

Differential Revision: D1224018
Fix a bug in ldClsPropAddr

When ldClsPropAddr encounters a class that is the same name
as the context class, but the context class is not loaded yet (which
is possible if you're inlining a static call), it can hit a code path
that never happened before where the clsVal wasn't constant but
useSpropCache was true.  Fix this.

Reviewed By: @edwinsmith

Differential Revision: D1223040
Use an FCallD opcode instead of annotation.cpp when HHBBC is on

Annotation.cpp can be confused by the types we end up putting
in TraceletContext when running under hhbbc.  This sets up a different
mechanism for propagating statically known class name and func name to
the FCall.

Reviewed By: @edwinsmith

Differential Revision: D1223119
Make JSON double parsing not-locale dependent

strtod() in a locale using a ',' decimal
separator will parse 3.14 as just 3 since '.' is
the thousands separator (or garbage, depending on locale).

Fallback on using Variant::toDouble() which uses
non-locale aware rules (aka en_US rules)

Closes #2053

Reviewed By: @fredemmott

Differential Revision: D1219096
s/hphp_session_set_save_handler/\__SystemLib\session_set_save_handler

Reviewed By: @fredemmott

Differential Revision: D1218771
allow all the default server.hdf options to be in php.ini

I can't get all the ini conversion done before the branch cut, so I'm just going to get the bare minimum done. These were from https://github.com/hhvm/packaging/blob/master/hhvm/deb/skeleton/etc/hhvm/server.hdf

I could put them all together but my plan is to inline them all anyways so I thought I would start that now.

Reviewed By: @fredemmott

Differential Revision: D1223378
make -c take either a .hdf or .ini

I want to make people think in `ini` instead of `hdf`. Instead of only getting one and passing it in that weird param, lets just re-use `-c`.

Reviewed By: @fredemmott

Differential Revision: D1223157
Fix tableflip emoticon in test runner

I suspect this may have been a copy/paste error.

Reviewed By: @jdelong

Differential Revision: D1224344
Prep NEWS for release: Ghostface Killah

Scanned through the commits for some
notable items.

Reviewed By: @swtaarrs

Differential Revision: D1224375
Clean up member operation helper signatures

This uses a templated typedef to make sure these functions take the
proper types, eliminating a bunch of reinterpret_casts and the potential for
certain bugs to be introduced.

Reviewed By: @jdelong

Differential Revision: D1223097
Don't return a reference to a local in keyAsValue

The argument is intentionally non-const to disallow passing a
temporary.

Reviewed By: @jdelong

Differential Revision: D1224333