move TestCodeRun tests from strings to files

I changed the ##run_verify.sh## script to recursivly search for a ##config.hdf## file and use that one. This allows us to easiy customize the options for each suite.

I converted the 6 different runtime options we supported to symlinks of ##.opts## files to the option that the test wants. If I was smarter I would then convert these to ##config.hdf## if the whole suite wanted the same options, but I'll save that for later cleanup if we want it.

I moved the config files around a bit. `test/cli.hdf` became the default `test/config.hdf`. `test/config.hdf` became `test/tcr/config.hdf`. `test/zend/config.hdf` is also now an empty file so it doesn't inherit `test/config.hdf`.

I'll handle the Repo part of the tests in the next diff. Then the next one after that will delete all the cpp code and Makefile targets and force you to just use ##tools/run_verify.sh## which I think we should rename ##test/run## or something easy.
ifdef out rdtsc in hotprofiler

I'm punting on this for now. I'm afraid of violating assumptions about
how the clock behind this interface works (and we do very specific stuff
like calculating CPU clock speed), so I don't want to try to replace it.
We'll revisit when we need to do serious profiling on ARM; we'll
definitely notice that this functionality is missing when we try to use
it.
interpOne instructions that fail the HHBC->HHIR translation

This diff adds full support for doing general interpOnes in HHIR.
Whenever a bytecode instruction fails (punts) in the HHBC->HHIR
translation, the NormalizedInstruction is marked with an 'interp' flag
and the HHIR translation for the whole tracelet is retried.  This
forces an InterpOne of such instruction, preventing HHIR from
attempting to translate it again, which then allows the HHBC->HHIR
translation to make further progress.  If another instruction in the
sequence punts again, the process is repeat and so on.
new opcode CreateCl

This is the bottleneck for closure perf. Instead of all the code in the prologue, it turned out the expensive thing about closures was constructing them. This bypasses all the roundabout copying involved with __construct and makes a new opcode to do the same thing.
Support repo mode in run_verify.sh
Optional syntax-highlighted HHIR dumps

It's enabled if the HPHP_TRACE_FILE is "/dev/stdout" or
"/dev/stderr" and also isatty(), or you can set HPHP_TRACE_TTY in your
environment to override it (e.g. if you like to pass to less -R).
Rename RuntimeType/DynLocation::isVariant() -> isRef()
Change copy-on-write protocol to always return valid pointers

Streamline the array access methods by always returning an array
pointer instead of a new pointer or null.  Callsites compare
(new != old) to detect escalation, rather than (new != null).
Fix bug in heredoc processing

My recent change to now/heredoc processing resulted in variables in heredocs mistakenly being tacked onto the end of the previous line in the output. This tends not to be a problem when emitting things that get parsed by something else, like emitting PHP. But it's noticable when emitting raw text.
Ensure C++ exceptions eventually propagate out of destructors.

This diff addresses what we called "step 1" in the task: simply ensure that any C++ exceptions that escape a destructor get rethrown and can continue to propagate naturally. The exception is remembered on the thread, and rethrown when we check for surprises later. If multiple destructors let C++ exceptions escape the last one to escape will be the one rethrown at the next surprise check.

This also ensures that C++ exceptions prevent more PHP code from running, by omitting calls to __destruct methods as we unwind the stack.

Finally, this also enables surprise checks for OnFunctionExit unless we're unwinding, in which case surprises remain unchecked so they can propagate later.

This is different than Zend's behavior, where destructors do run as fatals unwind.
start running TCR tests with verify

I went a bit crazy and supported all the quick and zend tests in the same format. Or do you think we should normalize the other way? Or are there better names? I think if you like this, I should move the "vm" directory to "quick" and the TectCodeRun to "slow" directory or something so we put tests into nicer suites.
rename /tools/run_verify.sh to /test/run

I'd like to make people use the script for running tests. With all the different options, the matrix of Makefile rules is getting pretty big. And with all the makefile magic, they aren't very discoverable what is runable.

The old name was pretty bad for tab completion. Since we have a dedicated test directory, why not put the script there? I'm not in-love with `run` but there are no other `r` files there so it is nice for tab completion.
delete repo file before trying

I've noticed that sometimes it won't rebuild the repo. Delete it just to make sure.
Rename test directories

These names don't make sense now that we run both suites the same
way.
Rename test directories

These names don't make sense now that we run both suites the same
way.
rename all the tests

After the "Great Test Refactor of 2013" these names didn't make sense.

After this diff, we now have 3 suites:

* Quick (old vm)
* Slow (old TestCodeRun)
* Zend

I like that Quick tests aren't in sub-suites and the Slow tests are. So that is a good litmus tests of what to put where.

I left all the old Makefile rules. I'll blow them up in a few weeks.

This diff is based on a simple unreviewable diff of

  $ mv test/vm test/quick
  $ mv test/tcr test/slow
Add function to get the async status for a mysql connection

This will allow for php code to better verify the async state
of the mysql connection and aid in debugging.  This diff adds
mysql_async_status as well as associated constants.
Fix crash in linting

Redeclared functions in non-whole-program analyze mode caused
an assertion failure.

Test Plan:
  % cat bug.php
  <?php
  if (isset($g)) {
    function f($x, $y) {}
  } else {
    function f($x) {}
  }
  f($x);
  % hphp -vWholeProgram=false -t analyze bug.php
Fix typedefs/shapes for whole program optimization

Needed a few cases for KindOfTypedefStatement,
EnableExperimentalHipHopSyntax, and passing it through to the scanner.
s/QuickTests/TestUnit/g

I looked at all the tests, and they seem to be unit tests for small parts of hphp.

They were run at the start of every TestExt test too, so I changed that so they are really just their own test now.