Fix potential security leak in HashContext

Summary: CVE-2014-6229

This is not a NUL-terminated string, it's a fixed-size block of data.
The risks were key truncation (if there happens to be a NUL byte in the
key) or over-reading (which would be information leakage).

Reviewed By: @ptarjan

Differential Revision: D1533546
Document hh_client --auto-complete

Summary: Closes https://github.com/facebook/hhvm/pull/3657

Reviewed By: @JoelMarcey

Differential Revision: D1534255
Add manpages for conversion tools

Summary: Last two. These are very minimal -- their usage really requires
a holistic description of the conversion process, for which I heavily
encourage readers to look at the HHVM docs site instead.

Reviewed By: @elgenie

Differential Revision: D1537420
Fix some typos in manpages.

Summary: As subject.  Tyops are bad.

Reviewed By: @jwatzman

Differential Revision: D1539805
Fix refcounting in arReturn() and stop leaking static strings.

Summary: Change arReturn() to take Variant&& and move the value
to the return slot in ActRec.

Reviewed By: @markw65

Differential Revision: D1541349
Fix flush_evaluation_stack

Summary: A test had been inserted to prevent it flushing the stack and rds
for rpc threads; but the test disabled it entirely.

Added a better check.

Reviewed By: @edwinsmith

Differential Revision: D1545777
Attempt to fix t5058784

Summary: Avoid a possible race condition with static properties

Reviewed By: @markw65

Differential Revision: D1547427
Use smart_calloc in NameValueTable

Summary: Don't leak memory.

Reviewed By: @mclarkelauer

Differential Revision: D1545494
Better fix for the static property race

Summary: If two threads tried to initialize static properties
for a derived class at the same time, and both tried to initialize
same same persistent property, the second one could overwrite
the property's value with garbage.

Reviewed By: @edwinsmith

Differential Revision: D1552834
Allow vm-stack flushing in rpc threads

Summary: We disabled the flush in rpc threads, on the grounds that the
execution context lives across requests. However, the execution context
is never *required* to live across requests, and could be reset for a
number of reasons at the start of the next request.

So instead, we reset the request, and then flush. This also solves (at
least in practice) the issue of rpc requests keeping treadmill fromd
working.

Reviewed By: @bertmaher, @dariorussi

Differential Revision: D1546288
Make guard relaxation work with unreachable code

Summary: Guard relaxation was relying on the simplifier + preoptimizer during
IR generation to eliminate unreachable code due to type-checks that
will always fail.  Such dependence is undesirable, and there are
special cases where the simplifier + preoptimizer aren't able to
eliminate unreachable code anyway.  This diff makes guard relaxation
more robust, so that it doesn't crash in such cases.

Reviewed By: @edwinsmith

Differential Revision: D1551777
Allocate uncounted strings with malloc.

Summary: APC strings are uncounted but not static, and consume a lot of
low-memory. This pressure can be bad in general, but especially
when the treadmill stalls.

Reviewed By: @markw65

Differential Revision: D1554596
Fixes segfault on certain memoized functions

Summary: Functions that use $this as a local get an extra initialization step. The easiest way to trigger this is to pass $this as an argument in a function call.
When a function with a local $this is memoized, we were trying to init the $this local in the wrapper and segfaulted because the wrapper doesn't have any named locals.

Reviewed By: @jano

Differential Revision: D1554192
Reduce NumSingleJitRequests from 20 to 5

Summary: Tweaks to warmup to reduce thread count.

Reviewed By: @markw65

Differential Revision: D1542901