Update cmake files to require jemalloc >= 3.5.1

Summary: @jasone landed a diff this morning which requires the allocx()
APIs in jemalloc.  Provide a useful error message if our version is
too old.

Reviewed By: @JoelMarcey

Differential Revision: D1545626
Add T_FINALLY to constants

Summary: Fixes #3703
Closes https://github.com/facebook/hhvm/pull/3708

Reviewed By: @sgolemon

Differential Revision: D1544682
make class closure consist with PHP

Summary: See #3431
Closes https://github.com/facebook/hhvm/pull/3460

Reviewed By: @sgolemon

Differential Revision: D1496023
Teach Hack about more curl constants

Reviewed By: @jwatzman

Differential Revision: D1541320
Refactor the parsing and processing of configuration options ... just a bit ...

Summary: ... and fix some bugs too :)

I was running into problems where it seemed like `-v` overrides were not being respected. So I wanted
to make sure that we had one goto place for parsing, processing and binding of configuration opens,
for easier debugging. This ended up into a bit of a refactor of our configuration option process.

Found a bug in `IniSetting::Set` where updates were not happening to existing pairs. This might
have been the biggest find during this whole process.

The second biggest find was probably the sort of subtle re-parsing of ini files for extension constants.
Right now we parse the whole file again; thus un-overriding any overrides that were given at the command
line. Needed to be a bit more clever on how we do this.

Reviewed By: @ptarjan

Differential Revision: D1524620
add low memory counters to ods

Summary: add fields for tracking low memory usage to jemalloc stats page. This will get picked up by ods automatically.

Reviewed By: @jasone

Differential Revision: D1537171
Use smart_calloc in NameValueTable

Summary: Don't leak memory.

Reviewed By: @mclarkelauer

Differential Revision: D1545494
More wordpress unfreezing

Summary: sadpanda

Reviewed By: @JoelMarcey

Differential Revision: D1545919
Fix guard relaxation to work with bytecode control flow

Summary: Due to control flow, a local may have multiple type sources at each program point. So change FrameState to keep the set of type sources for each local, instead of a single one. Also, get rid of None type-source kind.

Reviewed By: @alexmalyshev

Differential Revision: D1535860
Fix flush_evaluation_stack

Summary: A test had been inserted to prevent it flushing the stack and rds
for rpc threads; but the test disabled it entirely.

Added a better check.

Reviewed By: @bertmaher, @edwinsmith

Differential Revision: D1545777
Allow vm-stack flushing in rpc threads

Summary: We disabled the flush in rpc threads, on the grounds that the
execution context lives across requests. However, the execution context
is never *required* to live across requests, and could be reset for a
number of reasons at the start of the next request.

So instead, we reset the request, and then flush. This also solves (at
least in practice) the issue of rpc requests keeping treadmill fromd
working.

Reviewed By: @bertmaher, @dariorussi

Differential Revision: D1546288
Add some support for readline.

Summary: I think it would be nice to move parts of hphpd over to PHP-land, and having readline available would help with that.

Reviewed By: @ptarjan

Differential Revision: D1538831
Attempt to fix t5058784

Summary: Avoid a possible race condition with static properties

Reviewed By: @markw65

Differential Revision: D1547427
Fix cmake jemalloc check

Summary: Escaped backslashes or it will fail with "unexpected CAL_symbol, expecting $end"
See 28108aeb
Closes https://github.com/facebook/hhvm/pull/3716

Reviewed By: @sgolemon

Differential Revision: D1547302
Remove some modifications in tests from import_zend_test.py

Summary: These are all invalid now.
Closes https://github.com/facebook/hhvm/pull/3717

Reviewed By: @sgolemon

Differential Revision: D1547305
migrate many callsites from Config::GetFoo to Config::Bind

Summary: codemod -m --extensions cpp '([^ ]*)\s*=\s*Config::Get(Bool|String|Byte|UByte|Int16|UInt16|Int32|UInt32|Int64|UInt64)[(]ini,\s*([^\s]*),\s*([^\s]*)[)];' 'Config::Bind(\1, ini, \2, \3);'

and some manual rebasing to current behavior

Reviewed By: @ptarjan

Differential Revision: D1371389
Add hhvm.pcre.jit ini flag to check build config

Summary: Want the benchmark script to check this.

Reviewed By: @oyamauchi

Differential Revision: D1545388
Add hhvm.build_type ini setting

Summary: Also want the benchmark script to check this === release

Reviewed By: @JoelMarcey

Differential Revision: D1545461
Implement RegexIterator::INVERT_MATCH

Summary: Closes https://github.com/facebook/hhvm/pull/3718

Reviewed By: @sgolemon

Differential Revision: D1547317
Re-fix CMake jemalloc check

Summary: Get rid of backslashes that nobody
fully understands and add 0x to the version
constant, 'cause it's supposed to be hex.

Reviewed By: @fredemmott

Differential Revision: D1547859