Put abi-x64.h in X64 namespace

For consistency with abi-arm.h. This doesn't cause too much X64::
line-noise (since files like code-gen-x64.cpp just do `using namespace
X64`), and it shines a light on some spurious platform dependencies,
which are now well-marked for when future ARM codegen stumbles across
them.

Reviewed By: @edwinsmith

Differential Revision: D1104447
Experimental memoization profiler

A small profiler which looks for memoization opprotunities. It's fairly ghetto right now, and dumps its output to stderr, but it's useful as is now so I'm gonna put it in. It's not hooked up anywhere, but if you're interested in how to hook it up, run it, and intrepret the output lemme know.

Reviewed By: @hermanventer

Differential Revision: D1100611
ARM codegen for LdStack and DbgAssertRefCount

This was the top punt. Implementing that just moved a bunch of punting
to DbgAssertRefCount, so I implemented that too.

Reviewed By: @edwinsmith

Differential Revision: D1104532
Remove Mem and Refs flags, because they are dead

These flags aren't used for anything, so it's hard to know
what semantics they're supposed to have.  If we want to add something
similar in the future it will probably be just as easy to reason
through what we want from each opcode instead of trying to use these.

Reviewed By: @jdelong

Differential Revision: D1100600
Fix Phar's directory detection

I screwed up the prefix check. Something that is a directory has to have a `/` between the prefix and the file, not just any character.

Closes #1334

Reviewed By: @JoelMarcey

Differential Revision: D1104260
throw an exception if the DateTime is invalid (take 2)

This reverts commit 14ce743eb5b6f82a411aff93d4129344e3ea02a3.

Reviewed By: @elgenie

Differential Revision: D1073188
Remove dead dtorStubs

They were dead code.  After a brief chat on IRC we agreed
to get rid of them.

Reviewed By: @jdelong

Differential Revision: D1104938
More vestigial bits of Mem and Refs flags

Missed these pieces when killing them

Reviewed By: @jdelong

Differential Revision: D1106119
Remove useHHIR param from TraceletContext::recordRead

It doesn't look like this flag actually has any effects
now... am I missing something?

Reviewed By: @swtaarrs

Differential Revision: D1106158
Add hash_copy()

Missing piece of hash API

Reviewed By: @ptarjan

Differential Revision: D1104737
Fix cmake freetype include directory

Fixed overwriting FREETYPE_INCLUDE_DIRS when freetype located at
non-default path.
Merge pull request #1403 from javer/cmake-freetype

Fix cmake freetype include directory
Check for 32 bit OS first in the CMake file

Otherwise users may waste time installing missing dependencies just to get that error at the end
Merge pull request #1407 from brandonwamboldt/fix-cmake-priority

Check for 32 bit OS first in the CMake file
Fix some minor markdown formatting issues
Merge pull request #1422 from brandonwamboldt/fix-markdown-1

Fix some minor markdown formatting issues
Convert XLS m_pending to priority_queue

Simpler than explicitly doing heap operations on a vector.

Reviewed By: @swtaarrs

Differential Revision: D1106561
fix preg segfault

`php_pcre_replace` isn't guaranteed to return a String or Boolean. Lets just proxy the result back if it isn't a string instead of assuming and segfaulting the async tier.

Reviewed By: @markw65

Differential Revision: D1106633
Add parser support for language integrated query expressions.

This diff adds syntax to hphp.y, context sensitive keywords to hphp.ll, AST classes, a dummy emitter that just turns a query expression into a serialized CodeModel, as well as several test cases that exercise all options in the syntax and tests that the new keywords can still be used outside of queries.

The PHP syntax is exactly the same as the C# syntax.

There is significant restriction not present in C#, but necessary to get rid of shift reduce conflicts in Bison, namely: a query expression can only appear on the right hand side of an assignment to simple variable and as the expression of a return statement.

The need for making the "from" keyword context sensitive also precludes changing the syntax of "from $row in $table" to a more PHP compatible "from $table as $row", since $row can be any kind of expressions and hence does not provide enough context for the scanner to determine that the from token starts a query.

A query expression compiles to a call looking a bit like
   $rc = $c->executeQuery("serialized ast for normalized query expression", argvector);
   foreach ($rc as $re) { yield some_expression_containing($re); }
The $c is the value of the expression in the first from clause. The serialized ast represent the query expression after all parts of it that can be executed locally have been removed. Argvector is a vector of values that were computed locally. $rc is collection of tuples received from the query engine. The "foreach" turns the tuples into values as specified by the select clause.

This diff does not complete the implementation of code generation for query expressions. Specifically, the ast is not normalized, the argvector is null and the foreach is missing. I would like to get this diff out as is now in order to enable people to write query providers and test them with actual query expressions.

Reviewed By: @paroski

Differential Revision: D1088496
Misc tweaks/fixes

- aprof needs 6 digits just like a
- return the proper sizes for the admin port check-health command
- make an assert in emitVerifyParamType more useful

Reviewed By: @bertmaher

Differential Revision: D1103500