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.
Remove ArrayData litstr overloads

Some were dead.  Refactored the rest to use the CStrRef overload
instead, while still supporting litstr in the Array, ArrayInit, and
Variant apis.
Flatten fast path in GetNamedEntity

While investigating why gcc-4.7.1 is slower than gcc-4.6.2,
I noticed that under 4.6.2 the tbb code was being inlined into
Unit::GetNamedEntity, but under 4.7.1 it wasn't. Perf showed that
the inclusive time for GetNamedEntity was about .4% higher under
gcc-4.7.1.

Meanwhile, after various code changes, gcc-4.6.2 is no longer
inlining the tbb code either. Playing with the inlining options,
I wasnt able to get either version of gcc to inline it anymore,
but using __attribute__((__flatten__)) works for both. But that
also causes a bunch of other, slow-path code to be inlined, so
split it into a hot and a cold function, and flatten the hot
function.

Perf shows about a .2% win for Unit::GetNamedEntiry under gcc-4.6.2
Fix a bug in CreateCl, combine helper calls and use precoloring

The CreateCl translation dereferenced its targetcache handle
at compile time instead of in the TC, so we could get "class
undefined" errors if the targetcache slot in the thread that jitted it
didn't happen to have that closure defined.  Fix that, combine the two
helper calls, and use nativecalls so we get register precoloring.
Null check for colorize
Use bstrcaseeq in isame

bstrcaseeq is a bit less complex and should be faster for this case.
Add a new option to control args in backtraces

Add Eval.EnableArgsInBacktraces, which defaults to !Repo.Authoritative. This allows us to test what happens when backtraces keep references to function arguments even when testing in authoritative mode. Modified the test harness to set this to true when using Repo.Authoritative.
rewrite test running in php

It turned out to be more lines but feels a bit more maintainable. Thoughts? I personally would like python more here but I think @kma likes php for scripting.
fix slow tests

These tests have machine dependant things in them. Copy Zend and change the machine things to %s.
@override-unit-failures