Make TestCase::hasOutput() return true if "0" is outputted

TestCase::hasOutput() returns false when "0" is outputted, as it uses empty(), which returns false on the string "0". hasOutput is called when running PHPUnit with strict=true.

This probably already needed some tests, as no tests fail when hasOutput() is set to return random values and hasOutput doesn't seem to be called in any tests. `./Tests/Framework/TestCaseTest.php` looks like the place for the test but I'm not sure the best way to test this.

Sending this PR to master, but as it's a bug fix, should it go to 3.7?