A formatter which dumps out JSON.

Potentially very handy for debugging or for IPC.  Could replace Test::Harness.
Add TB2::Events->event_classes

Some tests want a list of all the event classes, so make it a public method
of TB2::Events.  Don't see the need to make it publicly documented.
Ensure that events can round trip via as_hash.
Fix the docs for TB2::Event->keys_for_as_hash

Something I noticed.
Add TB2::Event::Generic.

A generic event bucket useful for reconstituting events from serialization.

It will accept anything and turn it into an attribute.

This isn't 100% for all events.  For example, subtest_end has a history
object and a result.  Might have to add in some special cases later.
Use TB2::Event::Generic to reconstitute JSON events.
Move as_hash out of TB2::Event and into a role.

We're going to need it in TB2::History and other objects to do proper
recursive dumping.
Make TB2::History->in_test and done_testing always return a boolean

This is important when as_hash is added to TB2::History so in_test
and done_testing are always defined and thus always dumped.
Add TB2::History->as_hash and make as_hash recursive.

This makes dumping the event stream as_hash have the complete information.

I decided not to dump last_result or last_event because that seemed redundant
if you're looking at the whole event stream.  You're normally only looking
at the history object as part of a subtest_end event.

Decided not to dump the event storage, that would get large and recursive.

Decided not to dump store_events as that is not information about the
state of the test, but the state of the history object.  This is just data.
Merge pull request #375 from schwern/issue/159

Add a JSON formatter for #159