Detect references in foreach properly

Summary: Previously we would occasionally misdetect various constructs (e.g. $$foo) as
reference variables in foreach statements.

Fixes #4154

Reviewed By: @JoelMarcey

Differential Revision: D1664006

Signature: t1:1664006:1415379641:f0f3c61d02c8d89ae49396161e73fdc2110b0859
Prohibit alternate closing tags in Hack files

Summary: ?> is already disallowed, %> and </script> should be as well.

Closes #3830

Reviewed By: @fredemmott

Differential Revision: D1665178

Signature: t1:1665178:1415316647:014b9c93c860f0af9af08df2e20e3152930dadcf
Emit CheckFoo instead of GuardFoo if the region entry block is a loop header.

Summary: Also rename a lot of stuff named "unprocessedPred" as "loopHeader".

This can generate suboptimal translations as we'll have loopy PGO
translations with no retranslate exits. The plan going forward is to
have an post-processing pass to fix these translations up, but for now,
let's just get this correct.

Reviewed By: @jdelong

Differential Revision: D1666300