tc-print improvements and fixes

tc-print used to assume that all the bytecodes in a translation were
in the same function. This was a fine assumption, but now we have inlining so
that's often not true. TransBCMapping now holds an MD5 to identify the unit it
came from. This is then used while printing bytecodes to look in the correct
unit. I included a few other small tweaks:

- Better alignment for some output, and replace a lot of snprintf with
  folly::format
- systemlib is embedded in the tc-print binary so it can be loaded at startup
  (it's not in production repos)
- The native func and class units are generated at startup
- Function names are printed in translation summaries
- Bytecode offsets are printed in decimal instead of hex, to match conventions
  elsewhere

Reviewed By: @ottoni

Differential Revision: D1016351
Fix a bug in AGet{L,C} and simplifyLdCls

If AGetL throws due to autoload failure (e.g. parse time
fatal), we crash in the unwinder.

Reviewed By: @bertmaher

Differential Revision: D1018048
Update terminology in ir.specification to refer to blocks as blocks.

The IR is block-based now, and labels are optional.  Updated wording.

Reviewed By: @jdelong

Differential Revision: D1019285
Memoize getNativeFunctionName

Makes doing IR dumps faster.  (Ideally we'd combine this with
the one for Disasm but it's probably not a big difference and this
helped for now.)

Reviewed By: @swtaarrs

Differential Revision: D1013823
Allow default .hdf to be compiled in to php binary

Reviewed By: @swtaarrs

Differential Revision: D1013374
Increase minimum GCC version to 4.7.0

If you absolutely can't upgrade past gcc 4.6.x,
checkout tag gcc-4.6 or follow branch HHVM-2.2
Revert temporary gcc 4.6 hacks.

I modded the OSS version of the repo last week to keep it
building on gcc 4.6.  After much discussion we're setting the
minimum version at 4.7 and rather than sync these hacks internally
we'll be reverting them from the OSS side.
rename HPHP_VERSION to HHVM_VERSION

People keep asking me how to verify their upgrade worked and I tell them to print this constant. Then they always ask why is it still named HPHP. Good question.

I left the old one. Maybe we can kill it in 6 months?

Reviewed By: @sgolemon

Differential Revision: D1019640
ArrayInit constructor ssize_t -> size_t

In ArrayInit constructor, n is defined as ssize_t, but negative values
are not handled in any way. We should point that out to callers by
making n of type size_t.

Reviewed By: @edwinsmith

Differential Revision: D1017631
Fix ICU compliation when not using 51.x

'brew update' to a newer icu4c on OS X exposed that we aren't
being consistent in how we include it resulting in linker errors due to
confusion regarding what the icu namespace is.

Reviewed By: @sgolemon

Differential Revision: D1019529
Add two more functions to FBUnserializer API

This diff adds two functions to the FBUnserializer API, which I need to use.
1. done(), check whether the whole string is unserialized (I need it to make sure the fbobject/assoc range unserialize consumes all the input and didn't leave anything undecoded (and lost parts of the data).
2. getSerializedMap. I ran into a case that the map (structure data) comes first in the result, but the needed info (structure data fbtype) comes after that. I need to record the serialized map somewhere and then redecode the map with the fbtype.

Reviewed By: andrii

Differential Revision: D1018331
Jump opt for side-exiting jcc's

In the region compiler we can create side exits due to
user-level control flow, and we'd like the side exit to not go through
Astubs after it's been chained, if possible.  This optimization is
almost like what we already have for CheckStk and CheckLoc, but we
need it for Jcc's too.

Reviewed By: @jdelong

Differential Revision: D1019242
Fix template explosion in TransRec::print

folly::format explodes and exceeds a sane template depth so
break up the calls.

Reviewed By: @swtaarrs

Differential Revision: D1019754
Import php-src pull #479

Fix clowny error in zend-strtod.cpp on ARM platforms that passed through the PHP internals mailing list

Reviewed By: @JoelMarcey

Differential Revision: D1019758
Fix Buffer Overrun messages for tiff files

While processing tiff tags, the end pointer was not updated
after a realloc. Also, while processing IFD tag, end and begin pointers
were switched.

Closes #1154
Closes #1193

Reviewed By: @ptarjan

Differential Revision: D1019738

Pulled By: @scannell
Merge https://github.com/facebook/hhvm
undo 1d736ec9276ee355c58035a0e6bb47eb3603cfe9 & bb5dfb909c8a9f2218bdd3928f93a73ca1078eb0