Refactor navigation event handling.

*   Introduce new events and request callbacks to more consistently provide
    parity between the two.
*   Use dedicated functions to dispatch events and callbacks to ensure the
    custom event detail objects and callback arguments are identical.
*   Add events for handling clicks and history changes, allowing them to be
    canceled to prevent navigation.
*   Deprecate the old events and callbacks and remove unused string argument
    support for specifying callbacks.
*   Update the demo app to use the new events.

Progress on #12.
Add tests for refactored navigation events handling.

*   Ensure both events and callbacks are dispatched and executed, respectively.
*   Ensure that cancellation of events and callbacks is propagated.
*   Ensure that passed data is identical for events and callbacks.
*   Ensure that canceling callbacks or skipping events does not dispatch events.

Progress on #12.
Merge pull request #22 from nicksay/events

Refactor navigation event handling.