Make Vector use a packed array for its buffer

Summary: This diff changes Vector to use a PackedArray for its buffer instead of
using its own custom buffers.

This diff is based on top of D1337469.

Reviewed By: @elgenie

Differential Revision: D1335725
Fix printir for AFrozen

Summary: With TRACE=printir, code emitted into AFrozen was not getting
printed. Fix this. Also CodeCache::frozen() should always be
m_frozen.

Reviewed By: @swtaarrs

Differential Revision: D1361980
Use more ephemeral service requests

Summary: Use ephemeral service requests for BIND_JCC, BIND_SIDE_EXIT and BIND_ADDR.
BIND_CALL is a little more complex, and I'll do it in a separate diff.

Reviewed By: @jdelong

Differential Revision: D1362410
MySQLi port can now take an int-ish string

Summary: Fixes #2823
See f03f434
Closes #2824

Reviewed By: @fredemmott

Differential Revision: D1359972

Pulled By: @JoelMarcey
Make paramters for mysqli->begin_transaction() optional

Summary: Fixes #2838
Closes #2839

Reviewed By: @WizKid

Differential Revision: D1361612

Pulled By: @JoelMarcey
Do not process sleep / external thread events preemptively

Summary: There's not much point in processing I/O events preemptively. Their
process method just moves them from one queue to another queue, so let's
process them only when the queue of runnable resumables is empty.

Makes it easier to move the loop thru runnable resumables to JIT.

Reviewed By: @jdelong

Differential Revision: D1360684
Fix tc-print's handling of bytecode regions

Summary: tc-print has always treated a translation as a single, continuous
range of bytecode instructions. This was almost never true: we've been tracing
through forward Jmps since before tc-print was born. Inlining and PGO have just
made the problem worse. I hacked in rough inlining support a while ago but this
diff fixes it more.

The TC dump now has a list of bytecode blocks contained in the translation
rather than just a starting and stopping offset. Blocks contain a unit md5 (may
differ due to inlining) and a range of bytecode offsets. This is used to print
the correct bytecodes at the beginning of the translation's disassembly. I also
changed the bytecode that we print inline with the assembly to only print
bytecodes that have code directly assigned to them. The previous logic of
attempting to fill in the gaps didn't work when we had more than one block in a
translation, and as a result it often printed some bytecodes that weren't
actually in the translation.

Two more small improvements: guards are now printed in tc-print, and we
shouldn't falsely attribute time spent in the guards to the first bytecode
instruction of the translation anymore.

Reviewed By: @ottoni

Differential Revision: D1362151
Improve type-arith for bitwise operators.

Summary: When it doesn't get two constants it just returns TInitCell. We can do
better than that. php.net says that &, ^, and | will always return an
int, unless both operands are strings, then they will return a string.

Reviewed By: jdelong, eletuchy

Differential Revision: D1360657
Add a really fast API to fetch a custom bool setting from config

Summary: Add a builtin API to return a custom bool setting from
config.hdf. Since this value is constant during the lifetime of the hhvm
process, we can replace the call with the actual value at JIT time.
Note that I'm planning on adding server_get_custom_int_setting and
server_get_custom_string_setting in a follow up diff.

Reviewed By: @jdelong

Differential Revision: D1358762