Move return value retrieval from enterVM() to invoke*()

Retrieve the return value inside invoke*() functions instead of
enterVM(). The same function is now responsible for both pushing stuff
on the stack (ActRec & arguments) and popping stuff back from the stack
(result value) and makes it possible to implement invoke*() functions
with a different semantics.

Reviewed By: @paroski

Differential Revision: D1214864
Untangle type-variant.h from complex-types.h

Reviewed By: @jdelong

Differential Revision: D1213682
Optimize jittime counters

This goes from the old way of a hashmap with std::string keys to an
array with enum keys, just like Stats. Unfortunately it means we need to add
all counter names to timer.h but I think it's worth it.

Reviewed By: @jdelong

Differential Revision: D1212905
kill Option::setHookHandler

looks dead

Reviewed By: @markw65

Differential Revision: D1206200
Revert "Fix DateTime->format() flags 'e' and 'T' for offset time zones."

This reverts commit 15d69c2b684a3b028a47b9dc679f0c99824b9288. It was pointlessly allocating memory that could just have been in stack variables, doing work on every call that was only used in some cases, and leaking the allocated memory.

Reviewed By: @bertmaher

Differential Revision: D1216322
Disable flaky zend test

Reviewed By: @bertmaher
Constrain inner types in StLoc

This was causing generic dec-refs to be emitted when storing to boxed
locals.  I noticed this difference between HHBC and HHIR guard
relaxations while looking at some TC dumps.  HHBC guard relaxation
doesn't relax the inner type in this case.  This diff changes HHIR
guard relaxation to constrain the inner type to DataTypeCountness,
which is even better.

Reviewed By: @bertmaher

Differential Revision: D1216422
Add __IsFoldable user attribute for consty expressions

HNI/user version of IDL IsFoldable flag.

I had initially considered only setting isFoldable
on the function scope, but this ran into some ordering
issues (which weren't a problem for IDL builtins).
This approach also has the benefit of saving the foldability
to the repo instead of losing it post-compile.

Along the way I split parseUserAttributes and parseNativeAttributes
into separate helpers.  User is always called (for UAs which
apply to both HNI and PHP functions), while Native is
only caled on HNI functions.

Mark hash(), hash_hmac(), and hash_algos() as foldable
to exercise this API.

Reviewed By: @dariorussi

Differential Revision: D1212999
Implement ICU Transliterator

Per Zend implementation

Closes #1048

Reviewed By: @ptarjan

Differential Revision: D1210470
Implemented hash_pbkdf2() function

Implemented hash_pbkdf2() function.

Closes #1675
Closes #1943

Reviewed By: @ptarjan

Differential Revision: D1151242

Pulled By: @sgolemon
Add option for having ints overflow to floats

Adds -vHack.Lang.IntsOverflowToInts, which causes add/sub/mul operations
on ints to get converted to double operations when the integer result
would overflow. The option defaults to EnableHipHopSyntax.

Reviewed By: @ottoni

Differential Revision: D1172765
make stream_resolve_include_path deal with directories

I audited the other users of `resolveVmInclude()` and they all seem to only want files, so I left them alone.

Closes #1476

Reviewed By: @fredemmott

Differential Revision: D1215149
Fix the ordering of inheritance of classes and traits for getProperties()

Make ReflectionClass::getProperties() print properties in the declaration order.

Reviewed By: @ptarjan

Differential Revision: D1207149
hphpd ini fixes

* Only read from ~/.hphpd.hdf if you are about to read from ~/.hphpd.ini
* Actulaly save the config when it is needed

Reviewed By: @markw65

Differential Revision: D1216167