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.