Restore some mixed typed arguments with ?string type

Summary: fixes #3832

Reviewed By: @ptarjan

Differential Revision: D1592864
Convert APC to HNI

Summary: fixes #3627

Reviewed By: @ptarjan

Differential Revision: D1531906
Minor code cleanup for anon function unification.

Summary: This matches the similar code in typing.ml for checking anon
function invocation. Also, we do one less map lookup for the anonymous
function now.

No change in runtime behavior.

Reviewed By: @jwatzman, @elgenie

Differential Revision: D1596893
Add tests for the calling nested shutdown fix

Summary: More tests for 6bba8967d32109310e58720e2f89cb13857a769f
Closes #3904

Reviewed By: @ptarjan

Differential Revision: D1598798

Pulled By: @JoelMarcey
fix jemalloc stats

Summary: remove bad error checking that was blocking ods stats. Error count will go up if one occurs, but
will not prevent reporting.

Reviewed By: @bertmaher

Differential Revision: D1597889
Fix build

Reviewed By: @ptarjan
Create hhi for ext_icu_num_fmt

Summary: Creating a hhi file for NumberFormatter.

Reviewed By: @ptarjan

Differential Revision: D1582010
Refactor coloring code.

Summary: Delete unused syntax types, and refactor stuff in preparation
for the coverage metric

Reviewed By: @jwatzman

Differential Revision: D1583292
Add support for testing --color output.

Reviewed By: @pikatchu, @jwatzman

Differential Revision: D1585049
Implement per-file coverage metric.

Summary: I will handle directory-level coverage in a later diff. Most of the coverage code has been implemented on the server so we can parallelize that easily.

Reviewed By: @jwatzman

Differential Revision: D1583293
Fixes edge case involving bool args

Summary: If it's possible that the result of a memoize call can be null, we emit an array_key_exists check to see if the result is already cached. For boolean arguments, it would warn and always return false. So this casts the boolean arg to make the scenario work properly.

In order to make the code a little easier, this diff takes ?bool out of the fast path and makes it use the serialiation function. Since I can't actually find a use of ?bool as a typehint in tbgs, I think it's a reasonable choice.

Reviewed By: @elgenie, @jano

Differential Revision: D1598744
Disallow <<__Memoize>> on interfaces

Summary: One of the points of <<__Memoize>> is that it can be applied per function only where it makes sense. Interfaces shouldn't be able to require it. See the attached task for other reasons <<__Memoize>> on interfaces causes problems

Reviewed By: @jano

Differential Revision: D1599002
Don't crash on uncounted property initializers with AttrDeepInit set

Summary: The property initialization expression in the new test was causing
EmitterVisitor::requiresDeepInit to return true. This is bad for performance
because the value doesn't really need deep initialization, but more
importantly, we had code in the runtime that was assuming AttrDeepInit
properties were always refcounted. The change in emitter.cpp fixes the first
problem, which might help perf a little, and the change in object-data.cpp
protects us against any other expressions that could produce an uncounted
value.

Reviewed By: @markw65

Differential Revision: D1587716
Implement directory-level coverage stats.

Summary: Now you can do either `hh_client --coverage filename.php` or
`hh_client --coverage somedir/`. We will output a JSON representation of the
directory tree in the following format:

Directories are represented by

{ "type": "directory", "result": result, "children": {directory_or_file: result} }

Files are represented by

{ "type": "file", "result": result }

Coverage result types are represented by

{ "counts": { "checked": int, "unchecked": int, "partial": int }, "percentage": float }

where percentage = (checked + partial * 0.5) / (checked + partial + unchecked)

Reviewed By: @jwatzman

Differential Revision: D1588577
Take HH_FIXMEs into account in --color.

Summary: This required a refactor to move more of the coloring code
from the client to the server, because HH_FIXMEs are stored in the
ParserHeap which are only available server-side.

Reviewed By: @jwatzman

Differential Revision: D1589761
Use a map instead of an assoc list for coverage counts.

Reviewed By: @elgenie, @jwatzman

Differential Revision: D1596223
improve perf.php --help

Summary: ```
[fredemmott@devbig076 ~/fbcode/hphp/test/frameworks/perf] hhvm ./perf.php --help
Usage: ./perf.php \
  --<php5=/path/to/php-cgi|hhvm=/path/to/hhvm>\
  --<toys|wordpress|sugarcrm-login-page>

Options:
  --help
  --verbose
  --php5:
  --hhvm:
  --siege:
  --nginx:
  --toys
  --wordpress
  --sugarcrm-login-page
  --i-am-not-benchmarking
  --hhvm-extra-arguments:
  --skip-sanity-check
  --skip-version-checks
  --skip-database-install
  --trace
  --delay-nginx-startup:
  --delay-php-startup:
  --delay-process-launch:
  --delay-check-health:
  --max-delay-unfreeze:
  --max-delay-admin-request:
  --max-delay-nginx-keepalive:
  --max-delay-nginx-fastcgi:
  --daemon-files
  --temp-dir:
```

Reviewed By: @oyamauchi

Differential Revision: D1597196
Remove reflection hack for "HH\this"

Reviewed By: @elgenie

Differential Revision: D1512593
Get rid of mangle map stuff

Summary: This diff eliminates the need for using 'objdump' and making a map of
mangled C++ symbol names during the build. ext_hhvm was changed to instead
generate extern declarations for all the native functions defined in the
.idl files, and to use function pointer casts instead of using
"asm(<mangled-name>)" declarations.

Measurements on my dev machine show that this diff decreases hhvm build
times by 5% - 9%.

Reviewed By: @ptarjan

Differential Revision: D1556958