refactor(all): Apply SoC to the router and improve nav pipeline.

More than a refactor, this is a major re-design of the router's internals. The router has now been broken into a number of separate modules so that the code is easier to understand. The pipeline has been re-worked so that it is a bit more granular and can separate steps out more than in the past. A key element of this is that the navigation process begins with the construction of a navigation plan, which it uses to correctly transition the state hierarchy. This fixes a number of issues related to nested router lifecycles.