Add example and suite hooks

Add hook objects as containers for beforeEach/afterEach and
beforeSuite/afterSuite. Quick will soon be configurable to execute
suite-wide beforeEach/afterEach closures--this makes that change easier.

This commit also introduces typealiases for each of the hook closure
types, and uses them throughout the codebase.