Various fixes to HHIR guard relaxation

Fixed various bugs found while to get it working with legacy and hottrace region selectors.

Reviewed By: @swtaarrs

Differential Revision: D1148315
Fewer volatile classes

While doing some data profiling, I noticed that a lot of
very hot classes are marked volatile. It turns out to be due to
calls to fb_call_user_func* with literal strings or arrays.

That really doesn't seem to be necessary, so lets stop doing it.

Reviewed By: @dariorussi

Differential Revision: D1168590
Ignore image files

Fix following bug:

  Entity: line 1: parser error : Start tag expected, '<' not found
  GIF89ax
  ^
  HipHop Fatal error: Argument 1 passed to HHVMDocExtension::parseFunction() must be an instance of SimpleXMLElement, bool given in /data/users/watashi/fbcode/hphp/tools/docskel/base.php on line 131

Reviewed By: @ptarjan

Differential Revision: D1169494
use open() syscall for session entropy

there is a global funciton named `open()` in this file... yeah...

Reviewed By: @scannell

Differential Revision: D1169428
Closing one end of a stream_socket_pair causes the other end to report EOF.

Closes #1730
Closes #1755

Github  Author: Camillus Gerard Cai <cgcai@Alite404Exception.net>

Reviewed By: @fredemmott

Differential Revision: D1169262
Get rid of CG_PUNTs in instructions generated outside translateInstr

The mechanism to punt in code-gen and then get the region retranslated
with the punting instruction InterpOne'd only handles instructions
generated through translateInstr.  This diff eliminates the remaining
CG_PUNTs in instructions that may be emitted outside translateInstr,
namely:

IncTransCounter
IncProfCounter
CheckCold
RBTrace
GuardRefs
AssertStk
AssertLoc
AssertType
GuardLoc
GuardStk
LdRef
CheckLoc
CheckStk
CheckType

Reviewed By: @swtaarrs

Differential Revision: D1169885
Don't emit Out of bounds warning in php mode

Closes #1734
Closes #1737

Reviewed By: @alexmalyshev

Differential Revision: D1169228
Fix bug intersecting specialized types

If the type bits don't intersect, the result shouldn't include any
specialization.  This was causing the type system to say, e.g. that a
BoxedArr and Arr<PackedKind> intersected.

Reviewed By: @edwinsmith

Differential Revision: D1170388
Compilation fix for ext_curl

Compilation fix for ext_curl with older curl library.

Reviewed By: @ptarjan

Differential Revision: D1169112

Pulled By: @scannell
Implement cgCheckType's punt

Our translation infrastructure can't handle punts from some
CheckTypes. We should fix that but is a much simpler change that will help for
now.

Reviewed By: @ottoni

Differential Revision: D1168794
Explicitly close() (and check return value) in file_put_contents

Force close() and verify the result before returning success in file_put_contents for user streams that may do all their real work in close().

Closes #1735

Reviewed By: @markw65

Differential Revision: D1166297

Pulled By: @scannell
More MySQLi fixes

- Ran the tests and fixed some easy things
- 5 more tests that passes
- Cleaned up a bunch of tests that used table test.

Reviewed By: @ptarjan

Differential Revision: D1170091
Index SplObjectStorage by index instead of by hash.

I had to move the zend test as we will never be `var_dump` compatable with zend (and we don't have a user-land way to configure var_dump).
Closes #1759
Closes #1757

Reviewed By: @fredemmott

Differential Revision: D1169304

Pulled By: @ptarjan
Fix SplQueue iteration modes in HHVM

IT_MODE_FIFO is 0 - the LIFO bit needs to be checked instead.

Used by Guzzle: https://github.com/guzzle/guzzle/issues/538

Reviewed By: @JoelMarcey

Differential Revision: D1168832
Remove legacy _imm64_reg64 assembler functions.

Use the new style instead.

Reviewed By: @swtaarrs

Differential Revision: D1170777
Remove explicit use of rAsm in emitEagerSyncPoint().

We never called emitEagerSyncPoint() with a nonzero spDiff,
so just eliminate the adjustment code.  It will still use
rAsm indirectly in the assembler when vmpc is a large immediate.

Reviewed By: @swtaarrs

Differential Revision: D1170790
Dedicated opcodes for Int-Int comparison.

This is the first part of splitting up the comparison opcodes;
it creates dedicated opcodes for int comparison, with narrow
accepted types, and removes the Int-Int case handling from the
generic comparison opcodes.

Reviewed By: @bertmaher

Differential Revision: D1168558
Make curl handles invalid resources after close

Used by Guzzle: https://github.com/guzzle/guzzle/issues/538

Reviewed By: @ptarjan

Differential Revision: D1169039
Don't leak UserStreamWrappers

We were returning an over-refCounted resource.

Closes #1735

Reviewed By: @scannell

Differential Revision: D1168992
Final method should report itself as final

This seems to be isolated to the case where an interface declares a method
(without final), an implementer implements it as final, and an abstract
subclass of the implementer declares it is implementing the same interface.

Closes #1758
Closes #1524

Reviewed By: @fredemmott

Differential Revision: D1169289

Pulled By: @ptarjan