Convert arm::CodeGenerator to use vregs and ssa.

Summary: Moved assignRegs() from back-end-x64.cpp to reg-alloc.cpp, made it
portable by plumbing storesCell() and loadsCell() through BackEnd.

Moved cond() to code-gen-helpers.h, before realizing I didn't need
it for arm. But that's an ok target-independent place for it anyway.

Removed dead cgShuffle, push/popregs instructions, and RegSaver.

Reviewed By: @alexmalyshev

Differential Revision: D1582700
Delete unused code.

Summary: `default` is fairly similar to `opt_fold_left`, too, and
opt_fold_left has a nicer order of arguments...

Reviewed By: @jwatzman

Differential Revision: D1583128
Remove XLS, Constraint, and related dead code

Reviewed By: @alexmalyshev

Differential Revision: D1582745
Remove RegAllocInfo and PhysLoc

Reviewed By: @alexmalyshev

Differential Revision: D1582746
Make `yield;` a valid statement

Summary: Relevant to issue #1627

Next step should be make yield statement to expression and
then implement `Generator::send()/next()` etc methods.

I move two case from good to bad:
- hphp/test/zend/good/Zend/tests/generators/clone.php
- hphp/test/zend/good/Zend/tests/generators/errors/resume_running_generator_error.php

They raise fatal errors because of syntax error but not the real reason it should be.
they should be fixed in anthor diff
Closes https://github.com/facebook/hhvm/pull/3865

Reviewed By: @ptarjan

Differential Revision: D1584775

Pulled By: @jano
More ArrayInit checking

Summary: Adds a few additional checking mechanisms:
- Post-check the allocations, which is important since an extension could (and
  do) overrun the mem limit with many small allocations,
- Add CheckAllocation mode for ArrayInit
- Use it to protect array_fill

Reviewed By: @billf

Differential Revision: D1581694
Remove extraneous using

Summary: D1582746 removed a bunch of `using namespace x64;`. I think we just missed one.

Reviewed By: @ptarjan

Differential Revision: D1585722
Make binary test plaintext

Summary: Need this for #3805
This won't patch in sandcastle because binary.

Reviewed By: @ptarjan

Differential Revision: D1586619
Build Fix: Add libmemcached link directory to fix libmemcached linking

Summary: For MacPorts/HomeBrew users, libmemcached is located in neither
`/opt/local/lib` nor `/usr/local/lib`, however The `FindLibmemcached.cmake`
appends linking arguments without the linking directory:

    .... -framework ldap /opt/local/lib/liblber.dylib -lmemcached -lmemcachedutil /opt/local/lib/libcrypto.dylib

thus, at the final linking phase, the compiler couldn't find the libmemcached library.
Closes https://github.com/facebook/hhvm/pull/3867

Reviewed By: @paulbiss

Differential Revision: D1584278
Fix test/run -m pgo arguments

Reviewed By: @ottoni, @markw65

Differential Revision: D1522241
Update testing section of CONTRIBUTING

Summary: - we're no longer running all tests via Travis - just quick I think
 - we're getting a fair few untested pull requests. Try to discourage this.

Reviewed By: @paulbiss

Differential Revision: D1586489
Adds IMemoizeParam to the alias list

Summary: We need this to use IMemoizeParam without the namespace decorator, as specified in interfaces.hhi

Reviewed By: @jano

Differential Revision: D1585738
desugar lambda expressions

Summary: converts lambda expressions to standard php anonymous functions
Depends on D1571776

Reviewed By: @jwatzman

Differential Revision: D1572259
readline_read/write_history's parameter is optional

Summary: When passing `NULL` to ` write_history` or `read_history` `~/.history` will be used.

Also stop returning false on success and true on failure...

Closes https://github.com/facebook/hhvm/pull/3875

Reviewed By: @paulbiss

Differential Revision: D1584848
Define php_ini_scanned_files [closes #3550]

Summary: Fixes #3550 - undefined `php_ini_scanned_files()` function.

```php
var_dump(php_ini_scanned_files());
```

Before:
```
$ hhvm test.php
Fatal error: Call to undefined function php_ini_scanned_files() in test.php on line 3
```

After:
```
$ hhvm test.php
bool(false)
```
Closes https://github.com/facebook/hhvm/pull/3872

Reviewed By: @paulbiss

Differential Revision: D1585754
Check for OOM in VariantController::reserveMap

Summary: From the OOM stack logging in v2e, this looks like a frequent source
of whales.

Reviewed By: @edwinsmith

Differential Revision: D1584739
Add build-root option to hhvm_wrapper

Summary: Being able to tell hhvm_wrapper which build root is handywhen you
have multiple builds in separate directories. Currently hhvm_wrapper
assumes a fixed location for its executables it depends on (hphp and
hhvm). This patch adds an optional command line option to specify the
build root and threads it through to the various places that need it.

Reviewed By: @jdelong

Differential Revision: D1586515
Don't allow extract() to overwrite $GLOBALS or $this

Summary: CVE-2011-0752

Reviewed By: @markw65

Differential Revision: D1536049

Pulled By: @ptarjan
move images to be .expect files

Summary: These are dangerous as .expectf if the have a `%` in them...

Reviewed By: @paulbiss

Differential Revision: D1587488
Fix nsjrDefault()'s return type

Summary: Too much copy-paste made it a bool

Reviewed By: @edwinsmith

Differential Revision: D1586859