Link numa into hphp_util rather than hphp_runtime_static

Closes #1141
Prevent hang when numa isn't available

next_numa_node needed to check that its enabled.

Reviewed By: @edwinsmith

Differential Revision: D999329
Enable support for libedit in hphpd

Make hphpd compatible with both readline and libedit. Also fixes an issue with ctrl-c out of reverse history search. While searching, ctrl-c will now erase the current search result. Pressing enter will drop out of the search, but with the last match now presented on the hphpd command line. Ctrl-c again will erase the current command (as per usual) and leave a clean slate. Ideally, one ctrl-c during search would drop out of the search, but I've not found a way to get readline to do that for me. At least you can get out of history search without executing a command now, which is a big improvement.

Reviewed By: @scannell

Differential Revision: D993558
Disable some broken tests

Reviewed By: @alexmalyshev

Differential Revision: D1000016
Clear out convObjToBoolHelper

Another trivial helper bites the dust

Reviewed By: @ottoni

Differential Revision: D999834
Stop using Type::None for unknown locals or stack slots

We were only doing this for historical reasons and it was needlessly
complicating the code.

Reviewed By: @jdelong

Differential Revision: D996549
Pull TraceBuilder's state-tracking bits out into FrameState

TraceBuilder is now only responsible for creating, optimizing, and
appending instructions, as well as high-level control flow
operations. updateTrackedState and all related methods and fields now live in
FrameState. This will let us use it in modules other than TraceBuilder where
the information it provides would be valuable.

Reviewed By: @edwinsmith

Differential Revision: D998255
Don't store smart allocated Strings in FunctionScope

These are populated from various worker threads during
compilation (in the FunctionScope::setParamSpecs code path they aren't
static strings), and it was hitting the checkPreFree assertions that
smart-freed memory came from the allocator it was being free'd to.

Reviewed By: @markw65

Differential Revision: D1000408
Fix MD5::toString memory leak, other cleanup

Also broke dependency on zend_string to move it to util
(separate diff).

Reviewed By: @andralex

Differential Revision: D996205
Move HPHP::MD5 to util/

And split the small portion of util/util.h that it needed to
its own header.

Reviewed By: @andralex

Differential Revision: D996208
Print fpi entries in func pretty print

I've added this a few times for local debugging and never
committed it.  It's kinda useful.

Reviewed By: @bertmaher

Differential Revision: D1000633
Pull UserAttributeMap typedef out of Class/Func

I want to use it outside of these guys for now.  Also make
hphp-value.h #include'able without pulling all of complex-types.h

Reviewed By: @markw65

Differential Revision: D998305
Fix bug with how HphpArray::CopyReserve() initializes m_pos

For non-packed HphpArrays, CopyReserve() was blindly copying m_pos from the
source array to the new array. This is incorrect because tombstones are not
copied over to the new array. This diff adds appropriate logic to recompute
m_pos for the new array.

Reviewed By: @jdelong

Differential Revision: D998944
Add toValuesArray() and toKeysArray() to various traits/interfaces

This diff adds declarations and implementations as needed to make
toValuesArray() and toKeysArray() part of Iterables and KeyedIterables
respectively.

Reviewed By: @elgenie

Differential Revision: D998700
Clean up RDS, part 2

Part two tries to sort out the different types of allocations
from RDS, and abstract the allocation pattern found in a few runtime
structures into an RDS::Link type, and simplify namedAlloc stuff (most
namespaces were dead, and it also did unnamed allocs).  This also
allowed moving the unwind-specific parts of the header into a
dynamically-bound RDS::Link.  (Which also reduced header dependencies
for this module.)

The comments in the header hopefully make the idea clear.  A part 3 is
still coming, in which I plan to move the remaining actual "target
caches" back to JIT::, as just a use case of RDS.  The rds.h itself is
still going to be a central place where different "symbol" types have
to be registered, but I think that is probably ok and still a bit more
modular than it was.  (Ideally the symbols would have types associated
with them, but this would make rds.h depend on the JIT cyclically,
which is unfortunate, so I figure having helper functions for
different symbols that force the type is a reasonable enough thing.)

Reviewed By: @swtaarrs

Differential Revision: D990590
Clean up RDS / target cache, part 3

Move the target caches back to JIT::, since they are now
mostly a JIT specific use case of RDS.  Some target cache cleanup on
top in separate diff.

Reviewed By: @markw65

Differential Revision: D990837
Clean up target cache

Just delete some unused stuff, simplify the Cache<> template
a lot.  Delete some vestigial things in MethodCache (the Pair,
keyToPair function, etc).  That's all I'm going to do here for now.

Reviewed By: @markw65

Differential Revision: D990840
Clean up some classIsPersistent functions

I think the one in hhbc-translator.cpp might be a bug.

Reviewed By: @markw65

Differential Revision: D990844
Tweaks to RDS changes

Fix indentation of detail namespace and log strerror(errno)
if madvise fails.  Add a constant for 16-byte alignment.

Reviewed By: @swtaarrs

Differential Revision: D997449
Remove lookupKnownClass<true> (dead code)

We only use the false case now.

Reviewed By: @markw65

Differential Revision: D997502