Remove CppCall's indirect call kinds, move to its own header

Summary: IndirectReg and IndirectVreg were both unused, and CppCall is big
enough to deserve its own header.

Reviewed By: @edwinsmith

Differential Revision: D1593286
Restore Instr_TC stat counter

Summary: I'm a little concerned that this is going to result in a bunch of extra
work for the sake of accuracy. The old counter (plus an alternate
implementation that I tried) would overcount in the presence of side
exits, because it incremented the counter in bulk at the beginning of
each block. I guess this is OK though since it's only going to result in
extra code if stats are enabled.

Reviewed By: @swtaarrs

Differential Revision: D1594333
Don't parse cli options twice in the compiler

Summary: @markw65 found a bug in D1555790#89 where I was parsing the cli config options twice causing erroneous nodes.

Reviewed By: @markw65

Differential Revision: D1594447
adding ReflectionClass.hhi

Summary: ... reflection classes are fairly complex builtins, so
 the typechecker can deliver some value by knowing about its details.

Reviewed By: @​michalburger1

Differential Revision: D1593046
fixup VirtualHost lookup

Summary: Too many interations on the previous diff and I missed getting the real virtual host at least once so GetCurrent would return the right thing

Reviewed By: @markw65

Differential Revision: D1593559
Let hhbbc know that invariant_violation always fails

Summary: hhbbc does not know about call_user_func_array(), so when

  invariant(condition(), ...);

is rewritten as

  if (!condition()) {
    invariant(false, ...);
  }

it has trouble figuring out that invariant(false, ...) never
falls through.

After this diff, hhbbc figures out correctly that invariant(false, ...)
returns TBottom, but still cannot fully use this knowledge.

Reviewed By: @ptarjan, @elgenie

Differential Revision: D1595071
Kill HHIREnableCalleeSaveOpt runtime option

Summary: It isn't used anymore.

Reviewed By: @swtaarrs

Differential Revision: D1593488
Use precomputed static strings for chr

Summary: We already have these to support $str[$idx]. Might as
well use them for chr($chr) too.

Reviewed By: @swtaarrs

Differential Revision: D1595026
Allow shutdown function registration during shutdown

Summary: Closes #2981

Reviewed By: @ptarjan

Differential Revision: D1561536
Fix typo in builtins_async_mysql.idl.hhi

Summary: This was blocking the Codex parser from indexing the file.

Reviewed By: @jwatzman

Differential Revision: D1588349
typechecker: empty is analagous to isset

Summary: ... from the typechecker's perspective (since we don't
 distinguish between false and true at the type level). Also group
 together the handling of isset/empty/unset, since they're all
 pseudo-functions that actually correspond to different bytecode.

Reviewed By: @paroski

Differential Revision: D1596294
reflection support for first-class enums: ReflectionClass::isEnum [2/2]

Summary: The controversial portion of {D1589055}.
 * method ReflectionClass::isEnum : similar to is{Trait|Interface|Abstract}

Reviewed By: @paroski

Differential Revision: D1591338
support for 'abstract final' classes

Summary: PHP5 prevents having both `abstract` and `final` modifiers on a class at
 the same time.

 However, there are coding patterns that include classes that are
 intended to be used only as a collection of static utility methods,
 especially for pre-namespace, or namespace-avoiding, code.

 * Like an 'abstract' class, these cannot be instantiated directly.
 * Like a 'final' class, these cannot be generally inherited.
 * Unlike either an abstract class or a final class with a private
   constructor, whole program static analysis should be able to easily
   determine that any return / parameter typehints referring to this
   class are prima facia incorrect because there *cannot* be instances
   that satisfy them.
 * Unlike a trait, public static functions, when invoked directly, can
   use self:: and/or static:: to access protected/private static
   functions.
 * Unlike a trait, these classes can inherit from other abstract /
   concrete classes.

 In this diff, the 'abstract final' class is not allowed to declare
 non-static functions/props on its declaration (but can inherit such
 functions/props due to traits and parent classes). It's also expected
 to not have any remaining abstract static functions.

Reviewed By: @paroski

Differential Revision: D1594095
Tell hhbbc about enum type hints

Summary: It assumed they were type object, but they're not.

Reviewed By: @swtaarrs, @elgenie

Differential Revision: D1596140
Fix ArrayData pretty printer for string keys

Summary: typo

Reviewed By: @mxw

Differential Revision: D1595875