Yesterday I made a change that showed only the suite we wanted if
you specify its name in a querystring. But I forgot to update Hiro
itself to ignore all other suites so, as the result, today you
would *see* just one suite while Hiro would *run* all suites behind
the scenes. This patch fixes that.

When working on a feature it is often nice to be able to run one
particular suite. This patch modifies webui so that it reacts to
a suite name being a part of a query string:
http://localhost:7777/ <-- runs all tests
http://localhost:7777/BasicTests <-- runs only BasicTests
There's no UI for this yet because I'm not sure what's the best
solution.
Even though the solution is partial it closesGH-23.

Hiro 1 used to show location info whenever possible and, not to cause
a regression, I backported it into Hiro 2. The code is slightly
different, though: I got the latest version from QUnit's source code.
This closesGH-22.

Sometimes you need more than the default timeout (250ms) to do
your stuff. This patch adds a new argument to the Test.pause
method that can be used to specify a custom timeout value.
test.pause(500); // If after 500ms. test is still in paused
// state--consider it a failure.

Since we're merging Hiro 2 to master we need a new README that
reflects coding style changes and so on.
I've also renamed file to plain README because Markdown doesn't
seem to understand new lines and long lines are not very readable
in plain text.

So the change I made in 0931dd3
was a mistake. Dynamically mixing in Suite and Test creates a
clusterfuck in async tests.
Instead I decided to introduce a backwards incompatible change and
pass Test instance as the first argument of test case function.
Value of 'this' in test case functions should refer to Suite
instances only.

Although async execution of suites looks pretty it introduces lots
of problems with sandbox conflicts. Also, progress bar looks like
it came straight from Windows Me.
Since I am lazy and don't want to hunt down each case of async bugs
I just changed the whole thing to be synchronous.

Apparently, you need to have methods from both Test and Suite
instances inside of your test cases. Due to backwards compatibility
it has to be bound to 'this', we can't just introduce a new object
or argument.
That's why we have to mixing Test and Suite objects together
when test case is executed as a part of a suite (as opposed to
manually creating and running a single Test instance).

It seems like we forgot that a) we need references to window and
document objects for URLed sandboxes b) older version of Hiro
used to expose Suite.window and Suite.document.
Since (a) is a sloppy mistake and (b) breaks current Hiro setups,
we have to fix that.

Displaying empty (no test methods) suites in webui doesn't serve
any purpose. Empty suites are quite useful, on the other hand,
when you want to mixin setup functions into other non-empty suites.
So the easiest solution here is to fix webui to ignore empty suites.

Since onTest is being called before each test people use it to not
only generate test arguments but to add additional properties to
the test case and so on. This patch makes the code below possible:
hiro.module("MySuite", {
onTest: function () {
this.doctor = "who";
},
testSomething: function () {
myFunc(this.doctor); // Will pass "who"
}
});
However, to think about it, we just need to add an ability to
have custom properties and methods in the suite declaration but
that's an after-release task.

It's nice to be able to run Hiro tests with PhantomJS. This patch
ports PhantomJS integration from Hiro 1 to Hiro 2 (notice changes
in hiro listeners, etc.)
To run existing Hiro tests do the following:
1. Install PhantomJS
2. Start serving files by running 'grunt run'
3. In another terminal run 'phantomjs bin/phantom.js'
This patch closesGH-18.

It's _extremely_ annoying to spend time debugging frozen tests only
to realize that the source of the problem is in the onTest method.
We need to fail tests if, for whatever reason, onTest raises an
exception.

Almost all non-trivial JavaScript programs use callbacks heavily.
This means that sometimes you want to make sure that all your
assertions executed, even those inside the callback functions.
this.expect allows developers to explicitly specify how many
assertions need to be executed for the code to pass.
This patch closesGH-16 and GH-11.

Having no information about your failed tests is quite annoying so
I made webui to populate a hidden element with report data and then
show it to the user. Schematically it looks like this:
*BasicTests*
testSimpleAssertions PASS
testExceptions PASS
testAsync PASS
*NovelTests*
testTitle PASS
testAuthor PASS
testFailedTest FAIL
Assertion: assertTrue
Expected: true
Actual: true
In future, we should probably make Phantom output to resemble
webui output.

We bind test.onComplete listeners for all suites which means that
we need a way to detect when a listener is called for a test that
is outside of the current suite. The best way to do this is to
check whether the test element exists.