[fixed] Call all transition hooks on query changes

This commit fires transition hooks on all route handlers in the
hierarchy whenever the query changes, not just the leaf route.

This also fixes a regression in #499 that throws a TypeError when
there are not yet any routes in the router state (see #623).

Fixes #623