Improve memory_effects, make it talk in terms of abstract memory locations

Summary: Also teaches it to distinguish between may/must information for both
loads and stores, so it can be used for more than just DSE.  Audited all
instructions for effects on array elements and object properties, but a few
cases are still probably overly conservative for now (it's not clear to me that
we'll need to give up on array elements ever for instructions that might
re-enter).  This diff updates memelim to use the new interface.

Reviewed By: @edwinsmith

Differential Revision: D1669287
Don't JIT functions that use $php_errormsg or $http_response_code

Summary: The way we're handling these things doesn't quite work right in all
cases, and adds more complexity.

Reviewed By: @alexmalyshev

Differential Revision: D1679396
Add an analysis module for functions that query information about the IR

Summary: We've been throwing these into simplify.cpp generally, but they aren't
really part of that and I need to add a new one.  This seems to sit on about
the level as mutation.{h,cpp}.  I'm leaving getStackValue over there for now
because I think we want to delete it in the near future.

Reviewed By: @ottoni

Differential Revision: D1680648

Signature: t1:1680648:1416259182:99129ceedba54887041f69405c5d58525e6cc4b4
Add findDefiningBlock to analysis module

Summary: See documentation on the function.

Reviewed By: @ottoni

Differential Revision: D1680737

Signature: t1:1680737:1416003114:5fdceaa8bacbae7b376874618f7e0a42eabe45be
Fix CSE to be aware of where SSATmps are known to be defined

Reviewed By: @ottoni

Differential Revision: D1680740
Move least_common_ancestor to analysis module

Summary: I have a use for it

Reviewed By: @alexmalyshev

Differential Revision: D1681018

Signature: t1:1681018:1415934106:e36ed55329876fe1509bceddc3f7517bbeedbe7a
Fix problems in getCurrentPropertyOffset relating to m_ni.inputs

Summary: We can crash in here because knownCls can be non-null while baseCls is
null.  This can happen if you have a region containing only "FPushObjMethodD;
FCallD", and the callee is inlinable.  What happens is we'll generate a generic
push, and inline a call where all we know is that the $this is Type::Obj.
(This is probably a "bug" in its own right, but there are multiple things to
fix: one is that we should not generate regions like this (there was an assert
type right before that), another is that FCallD should probably influence the
IR's knowledge of the type of the object it's making a method call on, and a
third is that we should not be using types we determined during region
selection (from NormalizedInstruction::inputs) without knowing why they are
there (were they statically known, or due to a guard, etc).

For now just disable this situation if we don't know the type from this
translation.

Reviewed By: @alexmalyshev

Differential Revision: D1681932
Print the whole unit if we fail checkTmpsSpanningCalls

Summary: load elimination was breaking it, and this is nice for debugging.

Reviewed By: @alexmalyshev

Differential Revision: D1682367

Signature: t1:1682367:1415998086:94c304cd022e93c1cbd9ca0b009085eec78e8bea